ServiceClientGenerator.CustomizationsModel.GetPropertyModifier C# (CSharp) Method

GetPropertyModifier() public method

Gets the property modifier for a property in a shape (can be global) if so customized.
public GetPropertyModifier ( string shapeName, string propertyName ) : PropertyModifier
shapeName string The name of the shape containing the property
propertyName string The property name to look for
return PropertyModifier
        public PropertyModifier GetPropertyModifier(string shapeName, string propertyName)
        {
            // for renames, check for a shape-specific rename first, then look to
            // see if the property is globally renamed
            if (ShapeModifiers.ContainsKey(shapeName))
            {
                var shapeModifiers = ShapeModifiers[shapeName];
                if (shapeModifiers.IsModified(propertyName))
                    return shapeModifiers.PropertyModifier(propertyName);
            }

            if (ShapeModifiers.ContainsKey(GlobalShapeKey))
            {
                var globalShapeModifiers = ShapeModifiers[GlobalShapeKey];
                if (globalShapeModifiers.IsModified(propertyName))
                    return globalShapeModifiers.PropertyModifier(propertyName);
            }

            return null;
        }