Format:
Recent snippets for: Hadi Eskandari
foreach (Company co in companies) { try //a very weird error here in tests { //Business logic } catch { } }
133 Views
no comments
<TemplatesExport family="Live Templates"> <Template uid="a008a808-07e4-4027-9ed7-99167b28a16f" shortcut="dprop" description="Property wrapper that works with a Dependency Property" text="public $type$ $name$
{
 get { return ($type$) GetValue($name$Property); }
 set { SetValue($name$Property, value); }
}" reformat="True" shortenQualifiedReferences="True"> <Categories /> <Variables> <Variable name="type" expression="fixedTypeName()" initialRange="0" /> <Variable name="name" expression="suggestVariableName()" initialRange="0" /> </Variables> <CustomProperties /> </Template> </TemplatesExport>
327 Views
no comments
var realHandler = GetHandler<SomeType>(); var message = GetMessage(); //Returns derived type of SomeType var handlerType = typeof(IHandler<>); var genericType = message.GetType(); var genericHandler = handlerType.MakeGenericType(genericType); return realHandler --> as genericHandler would not work
181 Views
no comments
public IResult GetResultTree() { return new WebServiceResult<CampaignSessionBeanClient, GetCampaignTreeResultCompletedEventArgs>(x => x.GetCampaignTreeResultAsync(GetCampaignFilter()), x => { var propsals = new ProposalMapper().MapMany(x.Result); var Agencies = from agc in propsals group agc by agc.Agency.OrgOrgRoleId into agcGroup select new { OrgOrgRoleIdAgc = agcGroup.Key,
250 Views
no comments
@Stateless(name = "UserSessionEJB") @RemoteBinding(jndiBinding = "UserSessionRemote") @Remote(UserSessionRemote.class) @WebService public class UserSessionBean implements UserSessionRemote { @PersistenceContext protected EntityManager em; @WebMethod public List<Users> getAllUsers() {
175 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
