public static string GetAccessLevel(CsAccessLevel accesLevel) { switch (accesLevel) { case CsAccessLevel.Public: return("public"); case CsAccessLevel.Protected: return("protected"); case CsAccessLevel.Internal: return("internal"); case CsAccessLevel.ProtectedInternal: return("protected internal"); case CsAccessLevel.Private: return("private"); case CsAccessLevel.PrivateProtected: return("private protected"); case CsAccessLevel.Default: return(string.Empty); default: throw new ArgumentOutOfRangeException(); } }
private string GetAccessLevel(string keyWord, CsAccessLevel accessLevel) { switch (accessLevel) { case CsAccessLevel.Public: return(keyWord); case CsAccessLevel.Protected: return($"protected {keyWord}"); case CsAccessLevel.Internal: return($"internal {keyWord}"); case CsAccessLevel.ProtectedInternal: return($"protected internal {keyWord}"); case CsAccessLevel.Private: return($"private {keyWord}"); case CsAccessLevel.PrivateProtected: return($"private protected {keyWord}"); case CsAccessLevel.Default: return(string.Empty); default: throw new ArgumentOutOfRangeException(); } }
public CsConstructor(CsAccessLevel constructorAccessLevel = CsAccessLevel.Public, params CsParameter[] parameters) { ConstructorAccessLevel = constructorAccessLevel; foreach (CsParameter parameter in parameters) { Parameters.Add(parameter); } }
public CsIndexer(string genericIndexerReturnTypeName, CsAccessLevel indexerAccessLevel = CsAccessLevel.Public, params CsParameter[] parameters) { IndexerReturnType = genericIndexerReturnTypeName; IndexerAccessLevel = indexerAccessLevel; foreach (CsParameter parameter in parameters) { Parameters.Add(parameter); } }
public CsMethod(string methodName, string genericMethodReturnTypeName = "", CsAccessLevel methodAccessLevel = CsAccessLevel.Public, params CsParameter[] parameters) { MethodName = methodName; MethodReturnType = genericMethodReturnTypeName; MethodAccessLevel = methodAccessLevel; foreach (CsParameter parameter in parameters) { Parameters.Add(parameter); } }
public CsGetterSetter SetSetterAccessLevel(CsAccessLevel setterAccessLevel) { Setter = setterAccessLevel; return(this); }
public CsGetterSetter SetGetterAccessLevel(CsAccessLevel getterAccessLevel) { Getter = getterAccessLevel; return(this); }
public CsGetterSetter(CsAccessLevel getterAccessLevel = CsAccessLevel.Public, CsAccessLevel setterAccessLevel = CsAccessLevel.Public) { Getter = getterAccessLevel; Setter = setterAccessLevel; }
public CsProperty SetAccessLevel(CsAccessLevel propertyAccessLevel) { PropertyAccessLevel = propertyAccessLevel; return(this); }
public CsMethod SetAccessLevel(CsAccessLevel methodAccessLevel) { MethodAccessLevel = methodAccessLevel; return(this); }
public CsConstructor SetAccessLevel(CsAccessLevel constructorAccessLevel) { ConstructorAccessLevel = constructorAccessLevel; return(this); }
public CsIndexer SetAccessLevel(CsAccessLevel indexerAccessLevel) { IndexerAccessLevel = indexerAccessLevel; return(this); }
public CsIndexer(Type indexerReturnType, CsAccessLevel indexerAccessLevel = CsAccessLevel.Public, params CsParameter[] parameters) : this(indexerReturnType.GetTypeName(), indexerAccessLevel, parameters) { }
public CsFile SetAccessLevel(CsAccessLevel csAccessLevel) { CsAccessLevel = csAccessLevel; return(this); }
public CsFile(string nameSpace, string csName, CsAccessLevel csAccessLevel = CsAccessLevel.Public) { NameSpace = nameSpace; CsName = csName; CsAccessLevel = csAccessLevel; }
public CsMethod(string methodName, Type methodReturnType = null, CsAccessLevel methodAccessLevel = CsAccessLevel.Public, params CsParameter[] parameters) : this(methodName, methodReturnType.GetTypeName(), methodAccessLevel, parameters) { }
public CsProperty(string propertyName, string genericPropertyName, CsAccessLevel propertyAccessLevel = CsAccessLevel.Public) { PropertyName = propertyName; PropertyType = genericPropertyName; PropertyAccessLevel = propertyAccessLevel; }
public CsProperty(string propertyName, Type propertyType, CsAccessLevel propertyAccessLevel = CsAccessLevel.Public) : this(propertyName, propertyType.GetTypeName(), propertyAccessLevel) { }
public CsClass(string nameSpace, string className, CsAccessLevel classAccessLevel = CsAccessLevel.Public) : base(nameSpace, className, classAccessLevel) { }
public CsEnum(string nameSpace, string enumName, CsAccessLevel enumAccessLevel = CsAccessLevel.Public) : base(nameSpace, enumName, enumAccessLevel) { }