Skip to content

Commit

Permalink
Merge pull request #1 from Azure/master
Browse files Browse the repository at this point in the history
Updating to upstream
  • Loading branch information
parvezah committed Apr 2, 2015
2 parents c767799 + 96c153c commit c7b5ca5
Show file tree
Hide file tree
Showing 62 changed files with 4,921 additions and 741 deletions.
12 changes: 6 additions & 6 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@
</PropertyGroup>

<ItemGroup>
<ManagementLibrariesProjects Include="$(ManagementLibrariesSolution)" Condition="$(MamlProjectName) == ''" />
<ManagementLibrariesProjects Include="$(LibrarySourceFolder)\$(MamlProjectName)\*.csproj" Condition="$(MamlProjectName) != ''" />
<ManagementLibrariesProjects Include="$(LibrarySourceFolder)\$(Scope)\*.csproj" Condition=" '$(Scope)' != 'Common' and '$(Scope)' != 'Authentication' and '$(Scope)' != 'All' " />
<LibraryFxTargetList Include="$(FxTargetList)" />
</ItemGroup>

Expand Down Expand Up @@ -116,16 +115,15 @@
Properties="Configuration=Net45-$(Configuration);Platform=Any CPU;$(_ExtraPropertyList)"
Targets="Build"
Condition=" '$(Scope)' == 'Authentication' or '$(Scope)' == 'All' " />

<MSBuild Projects="$(ManagementLibrariesSolution)"
Properties="Configuration=%(LibraryFxTargetList.Identity)-$(Configuration);Platform=Any CPU;$(_ExtraPropertyList)"
Targets="Build"
Condition=" '$(Scope)' == 'All' " />

<MSBuild Projects="$(Scope)"
<MSBuild Projects="@(ManagementLibrariesProjects)"
Properties="Configuration=%(LibraryFxTargetList.Identity)-$(Configuration);Platform=AnyCPU;$(_ExtraPropertyList)"
Targets="Build"
Condition=" '$(Scope)' != 'Common' and '$(Scope)' != 'All' and '$(Scope)' != 'Authentication' " />
Targets="Build" />

<CallTarget Targets="CodeSignBinaries" Condition=" '$(CodeSign)' == 'true' " />

Expand Down Expand Up @@ -209,6 +207,8 @@

<Message Text="Code signing" Importance="high" />

<Message Text="Signing project: $(MSBuildProjectFullPath)" />

<MSBuild Projects="$(MSBuildProjectFullPath)"
Targets="SignBinariesForAFxTarget"
Properties="LibraryFxTarget=%(LibraryFxTargetList.Identity);StrongNameToken=$(StrongNameToken)">
Expand Down
3 changes: 3 additions & 0 deletions src/Common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<Compile Include="Models\OperationStatus.cs" />
<Compile Include="Models\OperationStatusResponse.cs" />
<Compile Include="Handlers\ClientRequestTrackingHandler.cs" />
<Compile Include="Models\ResourceBase.cs" />
<Compile Include="Models\ResourceBaseExtended.cs" />
<Compile Include="Models\ResourceIdentity.cs" />
<Compile Include="OData\FilterParameterAttribute.cs" />
<Compile Include="OData\FilterString.cs" />
<Compile Include="OData\UrlExpressionVisitor.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Microsoft.Azure.Common.nuget.proj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Microsoft.Azure.Common
-->
<SdkNuGetPackage Include="Microsoft.Azure.Common">
<PackageVersion>2.0.4</PackageVersion>
<PackageVersion>2.1.0</PackageVersion>

<Folder>$(MSBuildThisFileDirectory)</Folder>
</SdkNuGetPackage>
Expand Down
77 changes: 77 additions & 0 deletions src/Common/Models/ResourceBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//

// Warning: This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.

using System;
using System.Collections.Generic;
using Hyak.Common;

namespace Microsoft.Azure
{
/// <summary>
/// Resource information.
/// </summary>
public partial class ResourceBase
{
private string _location;

/// <summary>
/// Required. Gets or sets the location of the resource.
/// </summary>
public string Location
{
get { return this._location; }
set { this._location = value; }
}

private IDictionary<string, string> _tags;

/// <summary>
/// Optional. Gets or sets the tags attached to the resource.
/// </summary>
public IDictionary<string, string> Tags
{
get { return this._tags; }
set { this._tags = value; }
}

/// <summary>
/// Initializes a new instance of the ResourceBase class.
/// </summary>
public ResourceBase()
{
this.Tags = new LazyDictionary<string, string>();
}

/// <summary>
/// Initializes a new instance of the ResourceBase class with required
/// arguments.
/// </summary>
public ResourceBase(string location)
: this()
{
if (location == null)
{
throw new ArgumentNullException("location");
}
this.Location = location;
}
}
}
85 changes: 85 additions & 0 deletions src/Common/Models/ResourceBaseExtended.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//

// Warning: This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if the
// code is regenerated.

using System;

namespace Microsoft.Azure
{
/// <summary>
/// Resource information with extended details.
/// </summary>
public partial class ResourceBaseExtended : ResourceBase
{
private string _id;

/// <summary>
/// Optional. Gets or sets the ID of the resource.
/// </summary>
public string Id
{
get { return this._id; }
set { this._id = value; }
}

private string _name;

/// <summary>
/// Optional. Gets or sets the name of the resource.
/// </summary>
public string Name
{
get { return this._name; }
set { this._name = value; }
}

private string _type;

/// <summary>
/// Optional. Gets or sets the type of the resource.
/// </summary>
public string Type
{
get { return this._type; }
set { this._type = value; }
}

/// <summary>
/// Initializes a new instance of the ResourceBaseExtended class.
/// </summary>
public ResourceBaseExtended()
{
}

/// <summary>
/// Initializes a new instance of the ResourceBaseExtended class with
/// required arguments.
/// </summary>
public ResourceBaseExtended(string location)
: this()
{
if (location == null)
{
throw new ArgumentNullException("location");
}
this.Location = location;
}
}
}
143 changes: 143 additions & 0 deletions src/Common/Models/ResourceIdentity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
//
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//

namespace Microsoft.Azure
{
/// <summary>
/// Resource identity.
/// </summary>
public partial class ResourceIdentity
{
private string _parentResourcePath;

/// <summary>
/// Optional. Gets or sets parent resource path (optional).
/// </summary>
public string ParentResourcePath
{
get { return this._parentResourcePath; }
set { this._parentResourcePath = value; }
}

private string _resourceName;

/// <summary>
/// Required. Gets or sets resource name.
/// </summary>
public string ResourceName
{
get { return this._resourceName; }
set { this._resourceName = value; }
}

private string _resourceProviderApiVersion;

/// <summary>
/// Required. Gets or sets API version of the resource provider.
/// </summary>
public string ResourceProviderApiVersion
{
get { return this._resourceProviderApiVersion; }
set { this._resourceProviderApiVersion = value; }
}

private string _resourceProviderNamespace;

/// <summary>
/// Required. Gets or sets namespace of the resource provider.
/// </summary>
public string ResourceProviderNamespace
{
get { return this._resourceProviderNamespace; }
set { this._resourceProviderNamespace = value; }
}

private string _resourceType;

/// <summary>
/// Required. Gets or sets resource type.
/// </summary>
public string ResourceType
{
get { return this._resourceType; }
set { this._resourceType = value; }
}

/// <summary>
/// Initializes a new instance of the ResourceIdentity class.
/// </summary>
public ResourceIdentity()
{
}

/// <summary>
/// Initializes a new instance of the ResourceIdentity class.
/// </summary>
public ResourceIdentity(string name, string resourceType, string apiVersion)
{
ResourceName = name;
ResourceProviderNamespace = GetProviderFromResourceType(resourceType);
ResourceType = GetTypeFromResourceType(resourceType);
ResourceProviderApiVersion = apiVersion;
}

/// <summary>
/// Returns provider string from resource type.
/// </summary>
/// <param name="resourceType">Resource type.</param>
/// <returns>Provider</returns>
public static string GetProviderFromResourceType(string resourceType)
{
if (resourceType == null)
{
return null;
}

int indexOfSlash = resourceType.IndexOf('/');
if (indexOfSlash < 0)
{
return string.Empty;
}
else
{
return resourceType.Substring(0, indexOfSlash);
}
}

/// <summary>
/// Returns type string from resource type.
/// </summary>
/// <param name="resourceType">Resource type.</param>
/// <returns>Type</returns>
public static string GetTypeFromResourceType(string resourceType)
{
if (resourceType == null)
{
return null;
}

int lastIndexOfSlash = resourceType.LastIndexOf('/');
if (lastIndexOfSlash < 0)
{
return string.Empty;
}
else
{
return resourceType.Substring(lastIndexOfSlash + 1);
}
}
}
}
4 changes: 2 additions & 2 deletions src/Common/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
//This file is shared with Common.NetFramework to provide consistent file version.
//Do not put in extra assembly metadatas here; rather put them in AssemblyAdditionalInfo.cs.
//Also merge AssemblyAdditionalInfo.cs into the file once we delete the Common.NetFramework.
[assembly: AssemblyFileVersion("2.0.4.0")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyVersion("2.0.0.0")]
Loading

0 comments on commit c7b5ca5

Please sign in to comment.