@@ -2339,7 +2339,7 @@ internal static string MapTypeNameToMofType(ITypeName typeName, string memberNam
2339
2339
private static void GenerateMofForAst ( TypeDefinitionAst typeAst , StringBuilder sb , List < object > embeddedInstanceTypes )
2340
2340
{
2341
2341
var className = typeAst . Name ;
2342
- sb . AppendFormat ( CultureInfo . InvariantCulture , $ "[ClassVersion(\" 1.0.0\" ), FriendlyName(\" { className } \" )]\n class { className } ") ;
2342
+ sb . Append ( CultureInfo . InvariantCulture , $ "[ClassVersion(\" 1.0.0\" ), FriendlyName(\" { className } \" )]\n class { className } ") ;
2343
2343
2344
2344
if ( typeAst . Attributes . Any ( static a => a . TypeName . GetReflectionAttributeType ( ) == typeof ( DscResourceAttribute ) ) )
2345
2345
{
@@ -2912,19 +2912,19 @@ private static string MapAttributesToMof(string[] enumNames, IEnumerable<object>
2912
2912
{
2913
2913
if ( dscProperty . Key )
2914
2914
{
2915
- sb . AppendFormat ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } key") ;
2915
+ sb . Append ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } key") ;
2916
2916
needComma = true ;
2917
2917
}
2918
2918
2919
2919
if ( dscProperty . Mandatory )
2920
2920
{
2921
- sb . AppendFormat ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } required") ;
2921
+ sb . Append ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } required") ;
2922
2922
needComma = true ;
2923
2923
}
2924
2924
2925
2925
if ( dscProperty . NotConfigurable )
2926
2926
{
2927
- sb . AppendFormat ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } read") ;
2927
+ sb . Append ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } read") ;
2928
2928
needComma = true ;
2929
2929
}
2930
2930
@@ -2936,13 +2936,13 @@ private static string MapAttributesToMof(string[] enumNames, IEnumerable<object>
2936
2936
{
2937
2937
bool valueMapComma = false ;
2938
2938
StringBuilder sbValues = new ( ", Values{" ) ;
2939
- sb . AppendFormat ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } ValueMap{{") ;
2939
+ sb . Append ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } ValueMap{{") ;
2940
2940
needComma = true ;
2941
2941
2942
2942
foreach ( var value in validateSet . ValidValues )
2943
2943
{
2944
- sb . AppendFormat ( CultureInfo . InvariantCulture , $ "{ ( valueMapComma ? ", " : string . Empty ) } \" { value } \" ") ;
2945
- sbValues . AppendFormat ( CultureInfo . InvariantCulture , $ "{ ( valueMapComma ? ", " : string . Empty ) } \" { value } \" ") ;
2944
+ sb . Append ( CultureInfo . InvariantCulture , $ "{ ( valueMapComma ? ", " : string . Empty ) } \" { value } \" ") ;
2945
+ sbValues . Append ( CultureInfo . InvariantCulture , $ "{ ( valueMapComma ? ", " : string . Empty ) } \" { value } \" ") ;
2946
2946
valueMapComma = true ;
2947
2947
}
2948
2948
@@ -2961,27 +2961,27 @@ private static string MapAttributesToMof(string[] enumNames, IEnumerable<object>
2961
2961
2962
2962
if ( enumNames != null )
2963
2963
{
2964
- sb . AppendFormat ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } ValueMap{{") ;
2964
+ sb . Append ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } ValueMap{{") ;
2965
2965
needComma = false ;
2966
2966
foreach ( var name in enumNames )
2967
2967
{
2968
- sb . AppendFormat ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } \" { name } \" ") ;
2968
+ sb . Append ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } \" { name } \" ") ;
2969
2969
needComma = true ;
2970
2970
}
2971
2971
2972
2972
sb . Append ( "}, Values{" ) ;
2973
2973
needComma = false ;
2974
2974
foreach ( var name in enumNames )
2975
2975
{
2976
- sb . AppendFormat ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } \" { name } \" ") ;
2976
+ sb . Append ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } \" { name } \" ") ;
2977
2977
needComma = true ;
2978
2978
}
2979
2979
2980
2980
sb . Append ( '}' ) ;
2981
2981
}
2982
2982
else if ( embeddedInstanceType != null )
2983
2983
{
2984
- sb . AppendFormat ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } EmbeddedInstance(\" { embeddedInstanceType } \" )") ;
2984
+ sb . Append ( CultureInfo . InvariantCulture , $ "{ ( needComma ? ", " : string . Empty ) } EmbeddedInstance(\" { embeddedInstanceType } \" )") ;
2985
2985
}
2986
2986
2987
2987
sb . Append ( ']' ) ;
@@ -3047,7 +3047,7 @@ private static void GenerateMofForType(Type type, StringBuilder sb, List<object>
3047
3047
{
3048
3048
var className = type . Name ;
3049
3049
// Friendly name is required by module validator to verify resource instance against the exclusive resource name list.
3050
- sb . AppendFormat ( CultureInfo . InvariantCulture , $ "[ClassVersion(\" 1.0.0\" ), FriendlyName(\" { className } \" )]\n class { className } ") ;
3050
+ sb . Append ( CultureInfo . InvariantCulture , $ "[ClassVersion(\" 1.0.0\" ), FriendlyName(\" { className } \" )]\n class { className } ") ;
3051
3051
3052
3052
if ( type . GetCustomAttributes < DscResourceAttribute > ( ) . Any ( ) )
3053
3053
{
0 commit comments