
http://msdn.microsoft.com/en-us/vstudio/aa718325(v=vs.110).aspx
Adding Parameters that Process Command-Line Input The following sections are in this topic: Defining the Cmdlet Class [Cmdlet(VerbsCommon.Get, "proc")] public class GetProcCommand: Cmdlet Declaring Parameters A cmdlet parameter enables the user to provide input to the cmdlet.
Third-Party LINQ Providers Following is a short list of the third-party LINQ providers I've found to date in more-or-less chronological order: LINQ to WebQueries by Hartmut Maennel handles searches in the SiteSeer and MSDN Web sites. (This provider predates Fabrice's LINQ to Amazon provider by a few days.) LINQ to Amazon by Fabrice Marguerie, a co-author of the forthcoming LINQ in Action book, was the first third-party LINQ provider that I know of. LINQ to Amazon returns lists of books meeting specific criteria. LINQ to RDF Files by Hartmut Maennel handles queries against Resource Description Format files' triples.
How to write and read a color in C# Transforming a color in hexa representation using following function: private string WriteHexString(byte aobjColR, byte aobjColG, byte aobjColB){string strRet;byte[] btR = {aobjColR};string strR = ToHexString(btR);strRet = strR; byte[] btG = {this.colorDialog1.Color.G};string strG = ToHexString(btG);strRet += strG; byte[] btB = {this.colorDialog1.Color.B};string strB = ToHexString(btB);strRet += strB; return strRet;}//WriteHexString This function transform a Color (defined as Color.R, Color.G, Color.B) in hexa representation (as string) and use following helper functions: private static string ToHexString(byte[] bytes) {char[] chars = new char[bytes.Length * 2];for (int i = 0; i < bytes.Length; i++) {int b = bytes[i];chars[i * 2] = hexDigits[b >> 4];chars[i * 2 + 1] = hexDigits[b & 0xF];}return new string(chars);}//ToHexString static char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7','8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; and helper function:
Examples of Host Application Code In This Section This section includes the following topics. This example shows how to write a host application that invokes a command synchronously on the local computer. This example shows how to add cmdlets and their parameters to the command pipeline of a host application. .NET Micro 3/30/2014 - A new article listing common deployment and runtime error codes. 8/4/2013 - TFConvert still crashes, but is no longer needed! A new version of the font generating tool. 8/3/2013 - The sold microframeworkprojects.com was removed from the aggregated feed (and links, together with tinyclr.com), sorry it took so long!
The Wayward WebLog : IQueryable’s Deep Dark Secret I love the IQueryable interface, but it’s got a dark checkered past that most of you might not know about. IQueryable is a great way to expose your API or domain model for querying or provide a specialized query processor that can be used directly by LINQ. It defines the pattern for you to gather-up a user’s query and present it to your processing engine as a single expression tree that you can either transform or interpret. It’s the way LINQ becomes ‘integrated’ for many LINQ to XXX products. Yet it was not supposed to be that way; with all that ease of use, plugging automatically into LINQ with an abundance of pre-written query operators at your disposal.
Способ проверки подлинности Active Directory, используя проверку подлинности в формах и Visual C#.NET This step-by-step article demonstrates how an ASP.NET application can use Forms authentication to permit users to authenticate against the Active Directory by using the Lightweight Directory Access Protocol (LDAP). After the user is authenticated and redirected, you can use the Application_AuthenticateRequest method of the Global.asax file to store a GenericPrincipal object in the HttpContext.User property that flows throughout the request. Create an ASP.NET Web application in Visual C# .NET Write the authentication code Background Jobs Cmdlets can perform their action internally or as a Windows PowerShell background job. When a cmdlet runs as a background job, the work is done asynchronously in its own thread separate from the pipeline thread that the cmdlet is using. From the user perspective, when a cmdlet runs as a background job, the command prompt returns immediately even if the job takes an extended amount of time to complete, and the user can continue without interruption while the job runs. Background Jobs, Child Jobs, and the Job Repository The job object that is returned by the cmdlets that support background jobs defines the job.
The Wayward WebLog : LINQ to SQL: The Mapping Engine The primary purpose of any ORM system is to map relational data onto objects in your programming environment. Mapping here refers to the meaning in the mathematical sense that there is a correspondence from one item to the other. For example, a database row might map to an object, or a field in a database might map to a property. Some mappings are simple, like the ones I’ve already mentioned; others are more complex such as parts of multiple rows combining to form a single object.
Get-CommandPlugin - Windows PowerShell Blog One of the nifty new CTP3 features is command and parameter meta data on functions. In V1, you had to parse a function yourself to extract the parameters. In CTP2, you could use the tokenizer API to parse the function, but extracting parameters this was is error prone. In CTP3, and in V2, you can actually get a dictionary of parameters on the FunctionInfo object.