This file contains 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
nuget.exe push -Source "MyFeedName" -ApiKey VSTS Subfolder\bin\Release\MyProject.nupkg |
This file contains 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
start nuget.exe pack Subfolder\MyProject.csproj -OutputDirectory Subfolder\bin\Release -symbols -IncludeReferencedProjects -Prop Configuration=Release |
This file contains 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
<Target Name="AfterBuild" Condition=" '$(Configuration)' == 'Release'"> | |
<Exec Command="$(SolutionDir)\NuGet.exe pack $(ProjectPath) -IncludeReferencedProjects -Prop Configuration=Release"> | |
</Exec> | |
</Target> |
This file contains 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
param([string]$parameter1, [string]$parameter2) | |
Write-Host $parameter1 $parameter2 |
This file contains 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
<appender name="TracingAppenderFile" type="log4net.Appender.RollingFileAppender"> | |
<file value=".\\\App_Data\\\Logs\" /> | |
<datePattern value="yyyy-MM-dd'-TracingLogs.log'" /> | |
<appendToFile value="true" /> | |
<maximumFileSize value="256KB" /> | |
<maxSizeRollBackups value="20" /> | |
<rollingStyle value="Date" /> | |
<staticLogFileName value="false" /> | |
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" /> | |
<layout type="log4net.Layout.PatternLayout"> |
This file contains 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
<layout type="log4net.Layout.PatternLayout"> | |
<converter> | |
<name value="HTTPUser" /> | |
<type value="hbulens.Logging.HttpContextUserPatternConverter" /> | |
</converter> | |
<conversionPattern value="%level %date - %message - [%property{Category}] - [%HTTPUser] %newline" /> | |
</layout> |
This file contains 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 partial class Logger: ILogger | |
{ | |
#region Constructor | |
public Logger() | |
{ | |
log4net.Config.XmlConfigurator.Configure(); | |
this.Log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | |
} |
This file contains 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 Expression<Func<T, bool>> GetExpressionForType<TEntity>(string field, string operation, object value, string ignoreCase) | |
{ | |
Expression<Func<T, bool>> whereClause = default(Expression<Func<T, bool>>); | |
ParameterExpression param = Expression.Parameter(typeof(T), "x"); | |
MemberExpression member = Expression.Property(param, field); | |
Type propertyType = member.Type; | |
TypeConverter converter = TypeDescriptor.GetConverter(propertyType); | |
var result = converter.ConvertFrom(value.ToString()); | |
ConstantExpression constant = Expression.Constant(result); |
This file contains 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
static void QueryByYear(string level) | |
{ | |
GradeLevel year = (GradeLevel)Convert.ToInt32(level); | |
IEnumerable<Student> studentQuery = null; | |
switch (year) | |
{ | |
case GradeLevel.FirstYear: | |
studentQuery = from student in students | |
where student.Year == GradeLevel.FirstYear |
This file contains 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
[HttpGet] | |
public class SomeApiController : Controller | |
{ | |
public async Task<dynamic> Get( | |
int page, | |
int start, | |
int limit, | |
string sort = null, | |
string group = null, | |
string filter = null) |