Skip to content

Commit

Permalink
Address code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jhancock93 committed Jun 6, 2016
1 parent bd00705 commit ee9ac27
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion AutoRest/AutoRest.Core/GlobalSuppressions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,3 @@
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists", Scope = "member", Target = "Microsoft.Rest.Generator.ClientModel.ServiceClient.#Methods")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists", Scope = "member", Target = "Microsoft.Rest.Generator.ClientModel.ServiceClient.#Properties")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1002:DoNotExposeGenericLists", Scope = "member", Target = "Microsoft.Rest.Generator.ClientModel.ParameterTransformation.#ParameterMappings")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Scope = "member", Target = "Microsoft.Rest.Generator.Settings.#Create(System.Collections.Generic.IDictionary`2<System.String,System.Object>)")]
2 changes: 1 addition & 1 deletion AutoRest/AutoRest.Core/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public static void PopulateSettings(object entityToPopulate, IDictionary<string,
{
try
{
if (setting.Value.ToString().IsNullOrEmpty() && property.PropertyType == typeof(bool))
if (property.PropertyType == typeof(bool) && (setting.Value == null || setting.Value.ToString().IsNullOrEmpty()))
{
property.SetValue(entityToPopulate, true);
}
Expand Down
2 changes: 0 additions & 2 deletions AutoRest/Generators/CSharp/CSharp/CSharpCodeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ private void PopulateAdditionalProperties(ServiceClient serviceClient)
}
}


[SuppressMessage("Microsoft.Reliability", "CA2001:AvoidCallingProblematicMethods", MessageId = "System.Reflection.Assembly.LoadFrom")]
private HashSet<string> ResolveExternalReferences(ServiceClient serviceClient)
{
Expand Down Expand Up @@ -167,7 +166,6 @@ private static HashSet<string> ResolveExternalReferences(ServiceClient serviceCl
Properties.Resources.ConflictingTypesError, typeGroup.Key,
string.Join(", ", referenceAssemblies.Select(a => a.GetName())));
}

}
foreach (var model in modelTypesToRemove)
{
Expand Down

0 comments on commit ee9ac27

Please sign in to comment.