This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Convert-ToPackageReference | |
| { | |
| Param ( [Parameter( Mandatory, ValueFromPipeline )][String] $inputUri, | |
| [String] $stylesheetUri = "https://gist.githubusercontent.com/a4099181/074a6c3dd524ea0d343382137492399c/raw/cdd0fb31efd70c4c0f8c86ddb314de86ab8972e8/Convert-ToPackageReference.xsl", | |
| [String] $resultsFile = [System.IO.Path]::GetTempFileName() ) | |
| Process { | |
| $xslt = New-Object System.Xml.Xsl.XslCompiledTransform | |
| $xslt.Load( $stylesheetUri ) | |
| $xslt.Transform( $inputUri, $resultsFile ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Web.Http.SelfHost; | |
| using System.Web.Http; | |
| namespace ConsoleApplication1 | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace NoFormApplication | |
| { | |
| using System; | |
| using System.Windows.Forms; | |
| using NoFormApplication.Properties; | |
| /// <summary> | |
| /// Application specific context used to create application's main standard loop without form. | |
| /// </summary> | |
| /// <see cref="http://msdn.microsoft.com/en-us/library/ms157901.aspx" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class LambdaExpressionFactory | |
| { | |
| // With member type | |
| public static Expression<Func<T, TProperty>> Lambda<T, TProperty>(string memberName) | |
| { | |
| var parameterExpression = Expression.Parameter(typeof(T), "x"); | |
| var memberExpression = Expression.PropertyOrField(parameterExpression, memberName); | |
| var result = (Expression<Func<T, TProperty>>)Expression.Lambda(memberExpression, parameterExpression); | |
| return result; | |
| } |