| |
browse.develop.com
Browse.develop.com is a community that was established to collect and
organize valuable web information. Our technical staff have selected and
indexed information and courses that they feel will help you stay
current on best practices across the SDLC.
|
4 Articles match "Sample","Static Void"
| Related DevelopMentor Courses | MORE | | Understanding Map - Reduce 1: private static void MapReduce(). 1: private static IEnumerable Map(IEnumerable orders). In fact you could easily rewrite this into a LINQ query like this: 1: private static IEnumerable Map(IEnumerable orders). 1: private static IEnumerable Reduce(IEnumerable input). So just as with the Map process we could easily rewrite this as a LINQ group by query like this: 1: private static IEnumerable Reduce(IEnumerable input). Running the sample code produces output like this. 1: private static void ParallelMapReduce(). Simple right? The Problem Solver - Monday, December 3, 2012 What’s new in ApprovalTests.Net v.20? Here’s an example var urls = new [] { "/Home/Index/Hello" , "/" }; AspApprovals.VerifyRouting(MvcApplication.RegisterRoutes, urls); In the sample above, the delegate (MvcApplication.RegisterRoutes) will be invokes against a mock route collection, and then fed the URLs provided. sample output would look like this: /Home/Index/Hello = > [[controller, Home], [action, Index], [id, Hello]] / = > [[controller, Cool], [action, Index], [id, ]] Event approvals Similar to the example above, another aspect of code which is often hidden (or implicit) is which events are wired-up to your form. DevelopMentor Courses - Thursday, August 9, 2012 Generating an index in the database using Entity Framework Code First The sample below shows how it is done (thanks to Rolf for pointing me in the right direction): using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.Entity; using System.ComponentModel.DataAnnotations; namespace CodeFirstPlayground. {. static void Main( string [] args ). {. protected override void Seed( CodeFirstSampleModel context ). {. If you’re using Entity Framework Code First, then you may want to create an index on some of your table. class Program. {. var query = from c in model.Customers. where c.Name != DevelopMentor Courses - Tuesday, January 17, 2012 |
27 Articles match "Sample","Static Void"
| The Latest from DevelopMentor | MORE | | Understanding Map - Reduce 1: private static void MapReduce(). 1: private static IEnumerable Map(IEnumerable orders). In fact you could easily rewrite this into a LINQ query like this: 1: private static IEnumerable Map(IEnumerable orders). 1: private static IEnumerable Reduce(IEnumerable input). So just as with the Map process we could easily rewrite this as a LINQ group by query like this: 1: private static IEnumerable Reduce(IEnumerable input). Running the sample code produces output like this. 1: private static void ParallelMapReduce(). Simple right? The Problem Solver - Monday, December 3, 2012 Understanding Map - Reduce 1: private static void MapReduce(). 1: private static IEnumerable Map(IEnumerable orders). In fact you could easily rewrite this into a LINQ query like this: 1: private static IEnumerable Map(IEnumerable orders). 1: private static IEnumerable Reduce(IEnumerable input). So just as with the Map process we could easily rewrite this as a LINQ group by query like this: 1: private static IEnumerable Reduce(IEnumerable input). Running the sample code produces output like this. 1: private static void ParallelMapReduce(). Simple right? The Problem Solver - Monday, December 3, 2012 What’s new in ApprovalTests.Net v.20? Here’s an example var urls = new [] { "/Home/Index/Hello" , "/" }; AspApprovals.VerifyRouting(MvcApplication.RegisterRoutes, urls); In the sample above, the delegate (MvcApplication.RegisterRoutes) will be invokes against a mock route collection, and then fed the URLs provided. sample output would look like this: /Home/Index/Hello = > [[controller, Home], [action, Index], [id, Hello]] / = > [[controller, Cool], [action, Index], [id, ]] Event approvals Similar to the example above, another aspect of code which is often hidden (or implicit) is which events are wired-up to your form. DevelopMentor Courses - Thursday, August 9, 2012 | -
| The Best from DevelopMentor | MORE | - Understanding Map - Reduce
1: private static void MapReduce(). 1: private static IEnumerable Map(IEnumerable orders). In fact you could easily rewrite this into a LINQ query like this: 1: private static IEnumerable Map(IEnumerable orders). 1: private static IEnumerable Reduce(IEnumerable input). So just as with the Map process we could easily rewrite this as a LINQ group by query like this: 1: private static IEnumerable Reduce(IEnumerable input). Running the sample code produces output like this. 1: private static void ParallelMapReduce(). Simple right? The Problem Solver - Monday, December 3, 2012 - More Workflow 4 Services and duplex communications
The code in the Main() function now looks like this: static void Main( string [] args). {. Sample project SimpleDuplexDemo.zip. Yesterday I posted a long blog post explaining how to do duplex communications in a Workflow service. Also the callback address had to be passed by the client using CallbackContextMessageProperty and the workflow service had to use a callback correlation handle to connect the Receive activity with the Send activity used for the callback. So what is the problem with this? Unfortunate because this rules out scenarios like Silverlight. Conclusion. The Problem Solver - Tuesday, May 4, 2010 - WF4&WCF and message correlation
The new workflow definition looks like this: private static WorkflowElement CreateWorkflow(). {. This is done in the CreateCorrelationQuery() function as follows: private static CorrelationQuery CreateCorrelationQuery(). {. Namespaces = new XmlNamespaceManager( new NameTable()), Expression = "//sample:Person/sample:Id" }; xpath.Namespaces.AddNamespace( "sample" , "urn:WF4Sample:person" ); var messageQuerySet = new MessageQuerySet(). {. static void Main( string [] args). {. private static WorkflowElement CreateWorkflow(). {. The Problem Solver - Wednesday, September 2, 2009 - Peeling Back the Onion Architecture
private static void RegisterServices( IKernel kernel) { // Bind local services kernel.Bind< IProductService >().To< public class RepositoryModule : NinjectModule { public override void Load() { // Bind and get config service Bind< IConfigService >().To< ToConstant( mockCategories.Object ); } [ Test ] public void Should_Get_All_Categories() { // Arrange var categoriesRep = _ninjectKernel.Get< ICategoryRepository >(); // Act var categories = categoriesRep.GetCategories(); // Assert Assert.That(categories != The Web.Ui Enjoy. Tony and Zuzana's World - Saturday, October 8, 2011 - Easier Async for Silverlight Apps using MVVM
public static void InternalNotifyPropertyChanged( string propertyName, object sender, PropertyChangedEventHandler propertyChanged) { if (propertyChanged != protected void Notify ( EventHandler < NotificationEventArgs > handler, NotificationEventArgs e) { if (handler != null ) { InternalNotify(() => handler( this , e)); } } protected void Notify<TOutgoing> ( EventHandler < NotificationEventArgs <TOutgoing>> handler, NotificationEventArgs <TOutgoing> e) { if (handler != Technical MVVM Silverlight Tony and Zuzana's World - Saturday, January 29, 2011 - Claims Authorization in Geneva Beta 2 - Introduction
Use this sample authorization manager to inspect the data that gets passed in: class SimpleAuthorizationManager : ClaimsAuthorizationManager. {. private static void BrowseDirectory(). { }. The Geneva SDK includes a sample that shows how to use this extensibility point to parse authorization policy (in the Extensibility folder). With this sample you could write something like this for the above authorization statements: < policy resource = " Directory ". I guess you already heard the term “claims based authorization” several times by now. return true ; }. }. www.leastprivilege.com - Friday, July 10, 2009 - What’s new in ApprovalTests.Net v.20?
Here’s an example var urls = new [] { "/Home/Index/Hello" , "/" }; AspApprovals.VerifyRouting(MvcApplication.RegisterRoutes, urls); In the sample above, the delegate (MvcApplication.RegisterRoutes) will be invokes against a mock route collection, and then fed the URLs provided. sample output would look like this: /Home/Index/Hello = > [[controller, Home], [action, Index], [id, Hello]] / = > [[controller, Cool], [action, Index], [id, ]] Event approvals Similar to the example above, another aspect of code which is often hidden (or implicit) is which events are wired-up to your form. DevelopMentor Courses - Thursday, August 9, 2012 %>
| | |