Skip to content
This repository has been archived by the owner on Jun 17, 2019. It is now read-only.

Commit

Permalink
Create src folder and drop the early preview codebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-Peter Schaub committed Nov 17, 2015
1 parent 0fa3b13 commit bf85eab
Show file tree
Hide file tree
Showing 89 changed files with 9,712 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/.nuget/NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
25 changes: 25 additions & 0 deletions src/ALMRangersCodeAnalysisDictionary.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<Dictionary>
<Words>
<Recognized>
<Word>Changeset</Word>
<Word>Changesets</Word>
<Word>Tfs</Word>
<Word>TFS</Word>
</Recognized>
<Unrecognized>
<Word>StyleCop</Word>
<Word>SourceFiles</Word>
</Unrecognized>
<Compound>
<Term CompoundAlternate="StyleCop">Stylecop</Term>
<Term CompoundAlternate="SourceFiles">Sourcefiles</Term>
</Compound>
</Words>
<Acronyms>
<CasingExceptions>
<Acronym>AWS</Acronym>
<Acronym>SSH</Acronym>
</CasingExceptions>
</Acronyms>
</Dictionary>
21 changes: 21 additions & 0 deletions src/ALMRangersCommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ALMRangersCommonAssemblyInfo.cs" company="Microsoft Corporation">
// Copyright Microsoft Corporation. All Rights Reserved. This code released under the terms of the MIT License (MIT, https://github.com/ALM-Rangers/Migrate-assets-from-RM-server-to-VSO/blob/master/License.txt). This is sample code only, do not use in production environments.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

using System.Reflection;

[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyCopyright("Copyright ©2015 Microsoft Corporation")]
[assembly: AssemblyTrademark("Microsoft Visual Studio ALM Rangers")]

// Version information for an assembly consists of the following four values:
// Major Version
// Minor Version
// Build Number
// Revision
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.*")]
58 changes: 58 additions & 0 deletions src/ALMRangersRuleSet.ruleset
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="ALM Rangers Rule Set" Description="These rules are a suggested minimal set to comply with for ALM Rangers code deliverables" ToolsVersion="11.0">
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1301" Action="Error" />
<Rule Id="CA1400" Action="Error" />
<Rule Id="CA1401" Action="Error" />
<Rule Id="CA1403" Action="Error" />
<Rule Id="CA1404" Action="Error" />
<Rule Id="CA1405" Action="Error" />
<Rule Id="CA1410" Action="Error" />
<Rule Id="CA1415" Action="Error" />
<Rule Id="CA1821" Action="Error" />
<Rule Id="CA1900" Action="Error" />
<Rule Id="CA1901" Action="Error" />
<Rule Id="CA2002" Action="Error" />
<Rule Id="CA2100" Action="Error" />
<Rule Id="CA2101" Action="Error" />
<Rule Id="CA2108" Action="Error" />
<Rule Id="CA2111" Action="Error" />
<Rule Id="CA2112" Action="Error" />
<Rule Id="CA2114" Action="Error" />
<Rule Id="CA2116" Action="Error" />
<Rule Id="CA2117" Action="Error" />
<Rule Id="CA2122" Action="Error" />
<Rule Id="CA2123" Action="Error" />
<Rule Id="CA2124" Action="Error" />
<Rule Id="CA2126" Action="Error" />
<Rule Id="CA2131" Action="Error" />
<Rule Id="CA2132" Action="Error" />
<Rule Id="CA2133" Action="Error" />
<Rule Id="CA2134" Action="Error" />
<Rule Id="CA2137" Action="Error" />
<Rule Id="CA2138" Action="Error" />
<Rule Id="CA2140" Action="Error" />
<Rule Id="CA2141" Action="Error" />
<Rule Id="CA2146" Action="Error" />
<Rule Id="CA2147" Action="Error" />
<Rule Id="CA2149" Action="Error" />
<Rule Id="CA2200" Action="Error" />
<Rule Id="CA2202" Action="Error" />
<Rule Id="CA2207" Action="Error" />
<Rule Id="CA2212" Action="Error" />
<Rule Id="CA2213" Action="Error" />
<Rule Id="CA2214" Action="Error" />
<Rule Id="CA2216" Action="Error" />
<Rule Id="CA2220" Action="Error" />
<Rule Id="CA2229" Action="Error" />
<Rule Id="CA2231" Action="Error" />
<Rule Id="CA2232" Action="Error" />
<Rule Id="CA2235" Action="Error" />
<Rule Id="CA2236" Action="Error" />
<Rule Id="CA2237" Action="Error" />
<Rule Id="CA2238" Action="Error" />
<Rule Id="CA2240" Action="Error" />
<Rule Id="CA2241" Action="Error" />
<Rule Id="CA2242" Action="Error" />
</Rules>
</RuleSet>
6 changes: 6 additions & 0 deletions src/RMWorkflowMigrator.CmdLine/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
</startup>
</configuration>
82 changes: 82 additions & 0 deletions src/RMWorkflowMigrator.CmdLine/Options.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Options.cs" company="Microsoft Corporation">
// Copyright Microsoft Corporation. All Rights Reserved. This code released under the terms of the MIT License (MIT, https://github.com/ALM-Rangers/Migrate-assets-from-RM-server-to-VSO/blob/master/License.txt). This is sample code only, do not use in production environments.
// </copyright>
// <summary>
// Defines the Options type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

// ReSharper disable UnusedAutoPropertyAccessor.Global
namespace Microsoft.ALMRangers.RMWorkflowMigrator.CmdLine
{
using System;
using System.Data.SqlClient;

using CommandLine;
using CommandLine.Text;

internal class Options
{
[Option('n', "SqlServerName", Required = true, HelpText = "The name of the SqlServer server hosting the Release Management database.")]
public string SqlServerName { get; set; }

[Option('d', "DatabaseName", Required = true, HelpText = "The name of the Release Management database.")]
public string DatabaseName { get; set; }

[Option("ConnectTimeout", Required = false, DefaultValue = 15, HelpText = "The length of time (in seconds) to wait for a connection to the SQL server before terminating the attempt and generating an error. By default timeout is 15 seconds.")]
public int ConnectTimeout { get; set; }

[Option('l', "NetworkLibrary", Required = false, HelpText = "The name of the network library used to establish a connection to the SQL Server. Supported values include dbnmpntw (Named Pipes), dbmsrpcn (Multiprotocol), dbmsadsn (AppleTalk), dbmsgnet (VIA), dbmslpcn (Shared Memory) and dbmsspxn (IPX/SPX), and dbmssocn (TCP/IP). The corresponding network DLL must be installed on the system to which you connect. If you do not specify a network and you use a local server (for example, \".\" or \"(local)\"), Shared Memory is used.")]
public string NetworkLibrary { get; set; }

[Option('t', "TemplateName", Required = true, HelpText = "Name of the template to export. If the name contains spaces use \"the name\"")]
public string TemplateName { get; set; }

[Option('s', "TemplateStage", Required = true, HelpText = "Stage of the template to export. If the name contains spaces use \"the name\"")]
public string TemplateStage { get; set; }

[Option('o', "OutputFolder", DefaultValue = "Output", HelpText = @"The folder to output the migration PowerShell scripts to. Can be relative or absolute. If this parameter is being enclosed in quotation marks, do not include a trailing backslash. Ex: ""C:\Output"", not ""C:\Output\""")]
public string OutputFolder { get; set; }

[Option('c', "CreateParameterizedScripts", DefaultValue = false, HelpText = "Create scripts with parameter blocks instead of separate initialization scripts")]
public bool CreateParameterizedScripts { get; set; }

[Option('v', "Verbose", DefaultValue = false, HelpText = "Prints the detailed messages to standard output.")]
public bool Verbose { get; set; }

public string ConnectionString
{
get
{
var builder = new SqlConnectionStringBuilder { IntegratedSecurity = true, ConnectTimeout = this.ConnectTimeout };

if (!string.IsNullOrEmpty(this.SqlServerName))
{
builder.DataSource = this.SqlServerName;
}

if (!string.IsNullOrEmpty(this.DatabaseName))
{
builder.InitialCatalog = this.DatabaseName;
}

if (!string.IsNullOrEmpty(this.NetworkLibrary))
{
builder.NetworkLibrary = this.NetworkLibrary;
}

return builder.ConnectionString;
}
}

[ParserState]
public IParserState LastParserState { get; set; }

[HelpOption]
public string GetUsage()
{
return HelpText.AutoBuild(this, current => HelpText.DefaultParsingErrorsHandler(this, current));
}
}
}
Loading

0 comments on commit bf85eab

Please sign in to comment.