Improve all the response content

This commit is contained in:
qunshuzhang 2014-11-20 14:28:41 -08:00
Родитель 64df8e1db6
Коммит f29b4e0e47
8 изменённых файлов: 178 добавлений и 1 удалений

Просмотреть файл

@ -18,6 +18,10 @@
<Label>ResourceGroupName</Label>
<PropertyName>ResourceGroupName</PropertyName>
</ListItem>
<ListItem>
<Label>JobId</Label>
<PropertyName>JobId</PropertyName>
</ListItem>
<ListItem>
<Label>Location</Label>
<PropertyName>Location</PropertyName>
@ -47,5 +51,125 @@
</ListEntries>
</ListControl>
</View>
<View>
<Name>Microsoft.Azure.Commands.StreamAnalytics.Models.PSInput</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.Commands.StreamAnalytics.Models.PSInput</TypeName>
</ViewSelectedBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<Label>Name</Label>
<PropertyName>Name</PropertyName>
</ListItem>
<ListItem>
<Label>JobName</Label>
<PropertyName>JobName</PropertyName>
</ListItem>
<ListItem>
<Label>ResourceGroupName</Label>
<PropertyName>ResourceGroupName</PropertyName>
</ListItem>
<ListItem>
<Label>Properties</Label>
<PropertyName>PropertiesInJson</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
<View>
<Name>Microsoft.Azure.Commands.StreamAnalytics.Models.PSOutput</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.Commands.StreamAnalytics.Models.PSOutput</TypeName>
</ViewSelectedBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<Label>Name</Label>
<PropertyName>Name</PropertyName>
</ListItem>
<ListItem>
<Label>JobName</Label>
<PropertyName>JobName</PropertyName>
</ListItem>
<ListItem>
<Label>ResourceGroupName</Label>
<PropertyName>ResourceGroupName</PropertyName>
</ListItem>
<ListItem>
<Label>Properties</Label>
<PropertyName>PropertiesInJson</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
<View>
<Name>Microsoft.Azure.Commands.StreamAnalytics.Models.PSQuota</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.Commands.StreamAnalytics.Models.PSQuota</TypeName>
</ViewSelectedBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<Label>Name</Label>
<PropertyName>Name</PropertyName>
</ListItem>
<ListItem>
<Label>Location</Label>
<PropertyName>Location</PropertyName>
</ListItem>
<ListItem>
<Label>CurrentCount</Label>
<PropertyName>CurrentCount</PropertyName>
</ListItem>
<ListItem>
<Label>MaxCount</Label>
<PropertyName>MaxCount</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
<View>
<Name>Microsoft.Azure.Commands.StreamAnalytics.Models.PSTransformation</Name>
<ViewSelectedBy>
<TypeName>Microsoft.Azure.Commands.StreamAnalytics.Models.PSTransformation</TypeName>
</ViewSelectedBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<Label>Name</Label>
<PropertyName>Name</PropertyName>
</ListItem>
<ListItem>
<Label>JobName</Label>
<PropertyName>JobName</PropertyName>
</ListItem>
<ListItem>
<Label>ResourceGroupName</Label>
<PropertyName>ResourceGroupName</PropertyName>
</ListItem>
<ListItem>
<Label>Properties</Label>
<PropertyName>PropertiesInJson</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
</ViewDefinitions>
</Configuration>

Просмотреть файл

@ -63,5 +63,10 @@ namespace Microsoft.Azure.Commands.StreamAnalytics.Models
input.Properties = value;
}
}
public string PropertiesInJson
{
get { return input.Properties.ToFormattedString(); }
}
}
}

Просмотреть файл

@ -41,6 +41,18 @@ namespace Microsoft.Azure.Commands.StreamAnalytics.Models
public string ResourceGroupName { get; set; }
public string JobId
{
get
{
return job.Properties.JobId;
}
set
{
job.Properties.JobId = value;
}
}
public string Location
{
get

Просмотреть файл

@ -63,5 +63,10 @@ namespace Microsoft.Azure.Commands.StreamAnalytics.Models
output.Properties = value;
}
}
public string PropertiesInJson
{
get { return output.Properties.ToFormattedString(); }
}
}
}

Просмотреть файл

@ -50,6 +50,30 @@ namespace Microsoft.Azure.Commands.StreamAnalytics.Models
public string Location { get; set; }
public int CurrentCount
{
get
{
return subscriptionQuotas.Properties.CurrentCount;
}
set
{
subscriptionQuotas.Properties.CurrentCount = value;
}
}
public int MaxCount
{
get
{
return subscriptionQuotas.Properties.MaxCount;
}
set
{
subscriptionQuotas.Properties.MaxCount = value;
}
}
public SubscriptionQuotasProperties Properties
{
get

Просмотреть файл

@ -63,5 +63,10 @@ namespace Microsoft.Azure.Commands.StreamAnalytics.Models
transformation.Properties = value;
}
}
public string PropertiesInJson
{
get { return transformation.Properties.ToFormattedString(); }
}
}
}

Просмотреть файл

@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.StreamAnalytics
return JsonConvert.SerializeObject(properties, Formatting.Indented);
}
public static string ToFormattedString<T>(T objectToSerialize)
public static string ToFormattedString<T>(this T objectToSerialize)
{
return JsonConvert.SerializeObject(objectToSerialize, Formatting.Indented);
}

Просмотреть файл

@ -24,6 +24,8 @@ namespace Microsoft.Azure.Commands.StreamAnalytics
{
[Parameter(Position = 0, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The location of the azure stream analytics quota.")]
[ValidateNotNullOrEmpty]
[ValidateSet("East US", "East US 2", "North Central US", "North Europe", "West Europe", "Brazil South", "West US", "Central US", "South Central US",
"Japan East", "Japan West", "East Asia", "Southeast Asia", IgnoreCase = true)]
public string Location { get; set; }
[EnvironmentPermission(SecurityAction.Demand, Unrestricted = true)]