public static INPCInfo GetINPCingInfo(ContextInfo info, INamedTypeSymbol classSymbol) =>
 new INPCInfo(classSymbol,
              info.INPCingSymbol,
              symbol => AttributeHelper.HasAttribute(symbol, info.ViewModelAttributeSymbol) &&
              AttributeHelper.GetPropertyActualValue(symbol, info.ViewModelAttributeSymbol, AttributesGenerator.ImplementINPCing, false),
              "RaisePropertyChanging",
              "System.ComponentModel.PropertyChangingEventArgs",
              "protected void RaisePropertyChanging(PropertyChangingEventArgs e) => PropertyChanging?.Invoke(this, e);");
Ejemplo n.º 2
0
 public static string GetCanExecuteMethodName(IMethodSymbol methodSymbol, INamedTypeSymbol commandSymbol) =>
 AttributeHelper.GetPropertyActualValue(methodSymbol, commandSymbol, canExecuteMethod, (string)null);
Ejemplo n.º 3
0
 public static string GetCommandName(IMethodSymbol methodSymbol, INamedTypeSymbol commandSymbol, string executeMethodName) =>
 AttributeHelper.GetPropertyActualValue(methodSymbol, commandSymbol, commandName, executeMethodName + "Command").FirstToLowerCase();
Ejemplo n.º 4
0
 public static bool GetUseCommandManagerValue(IMethodSymbol methodSymbol, INamedTypeSymbol commandSymbol) =>
 AttributeHelper.GetPropertyActualValue(methodSymbol, commandSymbol, useCommandManager, true);
Ejemplo n.º 5
0
 public static bool GetAllowMultipleExecutionValue(IMethodSymbol methodSymbol, INamedTypeSymbol commandSymbol) =>
 AttributeHelper.GetPropertyActualValue(methodSymbol, commandSymbol, allowMultipleExecution, false);
Ejemplo n.º 6
0
 static string GetChangingMethodName(IFieldSymbol fieldSymbol, INamedTypeSymbol propertySymbol) =>
 AttributeHelper.GetPropertyActualValue(fieldSymbol, propertySymbol, nameofChangingMethod, (string)null);
Ejemplo n.º 7
0
        public static string GetSetterAccessModifierValue(IFieldSymbol fieldSymbol, INamedTypeSymbol propertySymbol)
        {
            var enumIndex = AttributeHelper.GetPropertyActualValue(fieldSymbol, propertySymbol, nameofSetterAccessModifier, 0);

            return(AccessModifierGenerator.GetCodeRepresentation(enumIndex));
        }
Ejemplo n.º 8
0
 public static bool GetIsVirtualValue(IFieldSymbol fieldSymbol, INamedTypeSymbol propertySymbol) =>
 AttributeHelper.GetPropertyActualValue(fieldSymbol, propertySymbol, nameofIsVirtual, false);
Ejemplo n.º 9
0
 public static bool GetImplementISSValue(ContextInfo contextInfo, INamedTypeSymbol classSymbol) =>
 AttributeHelper.GetPropertyActualValue(classSymbol, contextInfo.ViewModelAttributeSymbol, nameofImplementISS, false);