| |
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.
|
7 Articles match "Sample","Static"
| 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? simple example. 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 Streaming XML using LINQ to XML (continued) The code sample below will load nodes from an arbitrary XML files and yield them to the caller as they’re read from file: static IEnumerable Load( string filename, string elementName). {. Richard Blewett reminded me that the XmlReader.ReadSubtree method makes it even easier to use LINQ to XML with a streaming approach. XmlReaderSettings settings = new XmlReaderSettings(); settings.IgnoreWhitespace = true ; using (XmlReader reader = XmlReader.Create(filename, settings)). {. while (reader.ReadToFollowing(elementName)). {. // build element from subtree. NET LINQ DevelopMentor Courses - Tuesday, November 1, 2011 |
51 Articles match "Sample","Static"
| 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? simple example. 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? simple example. 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? simple example. The Problem Solver - Monday, December 3, 2012 - ASP.NET WebAPI Security 4: Examples for various Authentication Scenarios
The Thinktecture.IdentityModel.Http repository includes a number of samples for the various authentication scenarios. private static string GetIdentityToken(). {. private static Identity CallService( string saml). {. private static string GetServiceTokenOAuth2( string samlToken). {. private static string GetIdentityToken(). {. private static Identity CallService( string swt). {. Stay tuned for more client samples! All the clients follow a basic pattern: Acquire client credential (a single token, multiple tokens, username/password). Call Service. www.leastprivilege.com - Wednesday, March 14, 2012 - 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 - 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? As WCF callbacks are not supported using a ServiceHost on the client is unavoidable. The Problem Solver - Tuesday, May 4, 2010 - Peeling Back the Onion Architecture
private static void RegisterServices( IKernel kernel) { // Bind local services kernel.Bind< IProductService >().To< The sample application (which you can download here ) provides a reference architecture based on these principles. To use it you’ll need to download our good old friend, the Northwind sample database. Download the code for this article. recently started a consulting project as an architect on an ASP.NET MVC application and quickly found myself immersed in the world of N* open source tools. This is where the “Onion Architecture” comes in. The Web.Ui Tony and Zuzana's World - Saturday, October 8, 2011 - WPF MVVM Helper Library (WPF + MVVM = testability)
The ViewModel class has a public static field: ServiceProvider.Add( typeof ( IErrorVisualizer ), new MyErrorVisualizer ()); This replaces or adds the given service (using the type as the key) to the registry database. Just remember I put no guarentee on this code - consider it a sample for you to do whatever you like with. >>. There's been a lot of talk about the Model-View-ViewModel pattern recently and it's usage around the WPF and Silverlight technology stack. One of the things I give the students is a library to do MVVM - I also use it in my consulting work. Well, quite a bit. - 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 %>
| | |