Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
MAJ 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
geeooff committed Jan 28, 2017
1 parent cb212ed commit ce5e879
Show file tree
Hide file tree
Showing 54 changed files with 1,774 additions and 21,654 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.vs
.git
bin
obj
packages
*.vspscc
*.vssscc
6 changes: 6 additions & 0 deletions .hgignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
syntax: glob
.vs
.git
bin
obj
packages
6 changes: 3 additions & 3 deletions App.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="rotation" type="Smartgeek.LogRotator.Configuration.RotationSection, LogRotator"/>
<section name="rotation" type="IisLogRotator.Configuration.RotationSection, IisLogRotator"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<rotation>
<defaultSettings compress="true" compressAfter="7" delete="true" deleteAfter="730"/>
Expand Down
25 changes: 25 additions & 0 deletions App.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="IisLogRotator.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
</assembly>
686 changes: 686 additions & 0 deletions BuildProcessTemplates/AzureContinuousDeployment.11.xaml

Large diffs are not rendered by default.

543 changes: 543 additions & 0 deletions BuildProcessTemplates/DefaultTemplate.11.1.xaml

Large diffs are not rendered by default.

208 changes: 208 additions & 0 deletions BuildProcessTemplates/LabDefaultTemplate.11.xaml

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions BuildProcessTemplates/UpgradeTemplate.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<Activity mc:Ignorable="sad" x:Class="TfsBuild.Process" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client" xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sad="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sad1="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:this="clr-namespace:TfsBuild;" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<x:Members>
<x:Property Name="ConfigurationFolderPath" Type="InArgument(x:String)" />
<x:Property Name="AgentSettings" Type="InArgument(mtbwa:AgentSettings)" />
<x:Property Name="MSBuildArguments" Type="InArgument(x:String)" />
<x:Property Name="MSBuildPlatform" Type="InArgument(mtbwa:ToolPlatform)" />
<x:Property Name="DoNotDownloadBuildType" Type="InArgument(x:Boolean)" />
<x:Property Name="LogFilePerProject" Type="InArgument(x:Boolean)" />
<x:Property Name="SourcesSubdirectory" Type="InArgument(x:String)" />
<x:Property Name="BinariesSubdirectory" Type="InArgument(x:String)" />
<x:Property Name="TestResultsSubdirectory" Type="InArgument(x:String)" />
<x:Property Name="RecursionType" Type="InArgument(mtvc:RecursionType)" />
<x:Property Name="Verbosity" Type="InArgument(mtbw:BuildVerbosity)" />
<x:Property Name="Metadata" Type="mtbw:ProcessParameterMetadataCollection" />
<x:Property Name="SupportedReasons" Type="mtbc:BuildReason" />
</x:Members>
<this:Process.ConfigurationFolderPath>
<InArgument x:TypeArguments="x:String" />
</this:Process.ConfigurationFolderPath>
<this:Process.AgentSettings>[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamFoundation.Build.Workflow.Activities.TagComparison.MatchExactly }]</this:Process.AgentSettings>
<this:Process.MSBuildArguments>
<InArgument x:TypeArguments="x:String" />
</this:Process.MSBuildArguments>
<this:Process.MSBuildPlatform>[Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto]</this:Process.MSBuildPlatform>
<this:Process.DoNotDownloadBuildType>[False]</this:Process.DoNotDownloadBuildType>
<this:Process.LogFilePerProject>[False]</this:Process.LogFilePerProject>
<this:Process.SourcesSubdirectory>
<InArgument x:TypeArguments="x:String" />
</this:Process.SourcesSubdirectory>
<this:Process.BinariesSubdirectory>
<InArgument x:TypeArguments="x:String" />
</this:Process.BinariesSubdirectory>
<this:Process.TestResultsSubdirectory>
<InArgument x:TypeArguments="x:String" />
</this:Process.TestResultsSubdirectory>
<this:Process.RecursionType>[Microsoft.TeamFoundation.VersionControl.Client.RecursionType.OneLevel]</this:Process.RecursionType>
<this:Process.Verbosity>[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]</this:Process.Verbosity>
<this:Process.Metadata>
<mtbw:ProcessParameterMetadataCollection />
</this:Process.Metadata>
<this:Process.SupportedReasons>All</this:Process.SupportedReasons>
<mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
<Sequence mtbwt:BuildTrackingParticipant.Importance="None">
<Sequence.Variables>
<Variable x:TypeArguments="mtbc:IBuildDetail" Name="BuildDetail" />
</Sequence.Variables>
<mtbwa:GetBuildDetail DisplayName="Get the Build" Result="[BuildDetail]" />
<mtbwa:InvokeForReason DisplayName="Update Build Number for Triggered Builds" Reason="Triggered">
<mtbwa:UpdateBuildNumber BuildNumberFormat="[&quot;$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)&quot;]" DisplayName="Update Build Number" />
</mtbwa:InvokeForReason>
<mtbwa:AgentScope DisplayName="Run On Agent" MaxExecutionTime="[AgentSettings.MaxExecutionTime]" MaxWaitTime="[AgentSettings.MaxWaitTime]" ReservationSpec="[AgentSettings.GetAgentReservationSpec()]">
<mtbwa:AgentScope.Variables>
<Variable x:TypeArguments="x:String" Name="buildDirectory" />
</mtbwa:AgentScope.Variables>
<mtbwa:GetBuildDirectory DisplayName="Get the Build Directory" Result="[buildDirectory]" />
<If Condition="[Not String.IsNullOrEmpty(ConfigurationFolderPath)]" DisplayName="If Not String.IsNullOrEmpty(ConfigurationFolderPath)">
<If.Then>
<mtbwa:TfsBuild BinariesSubdirectory="[BinariesSubdirectory]" BuildDirectory="[buildDirectory]" CommandLineArguments="[MSBuildArguments]" ConfigurationFolderPath="[ConfigurationFolderPath]" DisplayName="Run TfsBuild for Configuration Folder" DoNotDownloadBuildType="[DoNotDownloadBuildType]" LogFilePerProject="[LogFilePerProject]" RecursionType="[RecursionType]" SourcesSubdirectory="[SourcesSubdirectory]" TestResultsSubdirectory="[TestResultsSubdirectory]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" />
</If.Then>
</If>
<If Condition="[BuildDetail.CompilationStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If CompilationStatus = Unknown">
<If.Then>
<mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" DisplayName="Set CompilationStatus to Succeeded" PropertiesToSet="CompilationStatus" />
</If.Then>
</If>
<If Condition="[BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If TestStatus = Unknown">
<If.Then>
<mtbwa:SetBuildProperties DisplayName="Set TestStatus to Succeeded" PropertiesToSet="TestStatus" TestStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" />
</If.Then>
</If>
</mtbwa:AgentScope>
<mtbwa:InvokeForReason Reason="CheckInShelveset">
<mtbwa:CheckInGatedChanges DisplayName="Check In Gated Changes" />
</mtbwa:InvokeForReason>
</Sequence>
</Activity>
4 changes: 2 additions & 2 deletions Configuration/InstallerConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
using System.Xml;
using System.IO;

namespace Smartgeek.LogRotator.Configuration
namespace IisLogRotator.Configuration
{
public static class InstallerConfig
{
private static readonly Object s_initializeSyncRoot = new Object();

private static bool s_initialized;
private static Exception s_initializeException;
private static String s_xmlFilePath;
private static string s_xmlFilePath;
private static XmlDocument s_xmlDoc;
private static XmlNode s_rotationNode;

Expand Down
4 changes: 2 additions & 2 deletions Configuration/RotationSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Configuration;

namespace Smartgeek.LogRotator.Configuration
namespace IisLogRotator.Configuration
{
public class RotationSection : ConfigurationSection
{
Expand Down Expand Up @@ -83,7 +83,7 @@ public SiteRotationSettingsElementCollection SitesSettings
set { this[s_propSitesSettings] = value; }
}

public RotationSettingsElement GetSiteSettingsOrDefault(String id)
public RotationSettingsElement GetSiteSettingsOrDefault(string id)
{
SiteRotationSettingsElement siteSettings = this.SitesSettings
.Cast<SiteRotationSettingsElement>()
Expand Down
2 changes: 1 addition & 1 deletion Configuration/RotationSettingsElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Configuration;
using System.ComponentModel;

namespace Smartgeek.LogRotator.Configuration
namespace IisLogRotator.Configuration
{
public class RotationSettingsElement : ConfigurationElement
{
Expand Down
2 changes: 1 addition & 1 deletion Configuration/RuntimeConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Configuration;

namespace Smartgeek.LogRotator.Configuration
namespace IisLogRotator.Configuration
{
public static class RuntimeConfig
{
Expand Down
8 changes: 4 additions & 4 deletions Configuration/SiteRotationSettingsElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.Configuration;

namespace Smartgeek.LogRotator.Configuration
namespace IisLogRotator.Configuration
{
public class SiteRotationSettingsElement : RotationSettingsElement
{
Expand All @@ -15,7 +15,7 @@ static SiteRotationSettingsElement()
{
s_propID = new ConfigurationProperty(
"id",
typeof(String),
typeof(string),
null,
ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey
);
Expand All @@ -35,9 +35,9 @@ protected override ConfigurationPropertyCollection Properties
get { return s_properties; }
}

public String ID
public string ID
{
get { return ((String)(this[s_propID])); }
get { return ((string)(this[s_propID])); }
set { this[s_propID] = value; }
}
}
Expand Down
6 changes: 3 additions & 3 deletions Configuration/SiteRotationSettingsElementCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
using System.Collections.Generic;
using Smartgeek.Configuration;

namespace Smartgeek.LogRotator.Configuration
namespace IisLogRotator.Configuration
{
public class SiteRotationSettingsElementCollection : ConfigurationElementCollection<SiteRotationSettingsElement, String>
public class SiteRotationSettingsElementCollection : ConfigurationElementCollection<SiteRotationSettingsElement, string>
{
protected override String GetElementKey(SiteRotationSettingsElement element)
protected override string GetElementKey(SiteRotationSettingsElement element)
{
return element.ID;
}
Expand Down
2 changes: 1 addition & 1 deletion DeleteReasonType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Linq;
using System.Text;

namespace Smartgeek.LogRotator
namespace IisLogRotator
{
/// <summary>
/// File logs deletion reasons
Expand Down
26 changes: 17 additions & 9 deletions Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
using System.DirectoryServices;
using System.Runtime.InteropServices;
using System.Diagnostics;
using Smartgeek.LogRotator.Resources;
using IisLogRotator.Resources;

namespace Smartgeek.LogRotator
namespace IisLogRotator
{
internal static class Extensions
{
public static String GetAttributeValue2(this ConfigurationElement element, String name)
public static string GetAttributeValue2(this ConfigurationElement element, string name)
{
ConfigurationAttribute attr = element.Attributes.FirstOrDefault(a => a.Name == name);

Expand All @@ -24,7 +24,7 @@ public static String GetAttributeValue2(this ConfigurationElement element, Strin
if (attr.Value == null)
return "<null>";

if (attr.Value.Equals(String.Empty))
if (attr.Value.Equals(string.Empty))
return "<empty>";

return "\"" + attr.Value.ToString() + "\"";
Expand Down Expand Up @@ -53,7 +53,7 @@ public static int GetWeekOfYear(this DateTime date)
);
}

public static String StripeUtf8Prefix(this String str)
public static string StripeUtf8Prefix(this string str)
{
if (str.StartsWith("u_", StringComparison.Ordinal))
{
Expand All @@ -62,12 +62,12 @@ public static String StripeUtf8Prefix(this String str)
return str;
}

public static T GetPropertyValue<T>(this DirectoryEntry entry, String propertyName)
public static T GetPropertyValue<T>(this DirectoryEntry entry, string propertyName)
{
return (T)entry.Properties[propertyName].Value;
}

public static T GetPropertyValue<T>(this DirectoryEntry entry, String propertyName, T defaultValue)
public static T GetPropertyValue<T>(this DirectoryEntry entry, string propertyName, T defaultValue)
{
if (entry.Properties.Contains(propertyName))
{
Expand All @@ -76,7 +76,7 @@ public static T GetPropertyValue<T>(this DirectoryEntry entry, String propertyNa
return defaultValue;
}

public static String GetIisLegacyVersionString(this OperatingSystem os)
public static string GetIisLegacyVersionString(this OperatingSystem os)
{
switch (os.Version.Major)
{
Expand All @@ -102,7 +102,7 @@ public static String GetIisLegacyVersionString(this OperatingSystem os)
return Strings.MsgUnknownIisVersionString;
}

public static String GetIisVersionString(this OperatingSystem os)
public static string GetIisVersionString(this OperatingSystem os)
{
switch (os.Version.Major)
{
Expand All @@ -121,6 +121,14 @@ public static String GetIisVersionString(this OperatingSystem os)
case 0: return "IIS 7.0";
case 1: return "IIS 7.5";
case 2: return "IIS 8.0";
case 3: return "IIS 8.5";
}
break;

case 10:
switch (os.Version.Minor)
{
case 0: return "IIS 10.0";
}
break;
}
Expand Down
2 changes: 1 addition & 1 deletion FileLogComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using System.IO;

namespace Smartgeek.LogRotator
namespace IisLogRotator
{
public class FileLogComparer : IComparer<FileLogInfo>
{
Expand Down
4 changes: 2 additions & 2 deletions FileLogInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Text.RegularExpressions;
using System.Globalization;

namespace Smartgeek.LogRotator
namespace IisLogRotator
{
public class FileLogInfo : IEquatable<FileLogInfo>
{
Expand Down Expand Up @@ -187,7 +187,7 @@ private void Initialize()
_isChild = true;
}

public override String ToString()
public override string ToString()
{
return this.File.FullName;
}
Expand Down
Loading

0 comments on commit ce5e879

Please sign in to comment.