public static InterfacePropertyGenerator Property(string name, Type type, bool get, bool set, HighlightType highlightType = HighlightType.Type) { var interfaceProp = new InterfacePropertyGenerator(); interfaceProp.name = name; interfaceProp.type = type; interfaceProp.isStringType = false; interfaceProp.highlightType = highlightType; interfaceProp.get = (get ? "get".ConstructHighlight() + "; " : string.Empty); interfaceProp.set = (set ? "set".ConstructHighlight() + "; " : string.Empty); return(interfaceProp); }
public static InterfacePropertyGenerator Property(string name, string stringNamespace, string type, bool get, bool set, bool withNamespace = true, HighlightType highlightType = HighlightType.Type) { var interfaceProp = new InterfacePropertyGenerator(); interfaceProp.name = name; interfaceProp.withNamespace = withNamespace; interfaceProp.stringNamespace = stringNamespace; interfaceProp.stringType = type; interfaceProp.isStringType = true; interfaceProp.highlightType = highlightType; interfaceProp.get = (get ? "get".ConstructHighlight() + "; " : string.Empty); interfaceProp.set = (set ? "set".ConstructHighlight() + "; " : string.Empty); return(interfaceProp); }
public InterfaceGenerator AddProperty(InterfacePropertyGenerator generator) { properties.Add(generator); return(this); }