Version 2.1.0.0

CodeWriter class

Namespace: Sirenix.Utilities.Editor.CodeGeneration
Assembly: Sirenix.Utilities.Editor
public sealed class CodeWriter : IDisposable
Not yet documented.
Inheritance
  • System.Object
  • CodeWriter

Constructors

CodeWriter()
Not yet documented.
public CodeWriter()
CodeWriter(Stream)
Not yet documented.
public CodeWriter(Stream stream)
Parameters
System.IO.Stream stream

CodeWriter(TextWriter)
Not yet documented.
public CodeWriter(TextWriter writer)
Parameters
System.IO.TextWriter writer

Properties

Indent
Not yet documented.
public int Indent { get; set; }
IndentWithTabs
Not yet documented.
public bool IndentWithTabs { get; set; }
Namespace
Not yet documented.
public string Namespace { get; set; }
SpacesPerIndent
Not yet documented.
public int SpacesPerIndent { get; set; }

Methods

AddExternAlias(String)
Not yet documented.
public void AddExternAlias(string alias)
Parameters
System.String alias

BeginConstructor(AccessModifier, String)
Not yet documented.
public void BeginConstructor(AccessModifier access, string typeName)
Parameters
AccessModifier access

System.String typeName

BeginConstructor(AccessModifier, String, String)
Not yet documented.
public void BeginConstructor(AccessModifier access, string typeName, string baseString)
Parameters
AccessModifier access

System.String typeName

System.String baseString

BeginConstructor(AccessModifier, String, String, Type[], String[])
Not yet documented.
public void BeginConstructor(AccessModifier access, string typeName, string baseString, Type[] args, string[] argNames)
Parameters
AccessModifier access

System.String typeName

System.String baseString

System.Type[] args

System.String[] argNames

BeginGetter(Nullable<AccessModifier>)
Not yet documented.
public void BeginGetter(AccessModifier? access = default(AccessModifier? ))
Parameters
System.Nullable<AccessModifier> access

BeginMethod(AccessModifier, Type, String)
Not yet documented.
public void BeginMethod(AccessModifier access, Type returnType, string name)
Parameters
AccessModifier access

System.Type returnType

System.String name

BeginMethod(AccessModifier, Type, String, Boolean, Boolean)
Not yet documented.
public void BeginMethod(AccessModifier access, Type returnType, string name, bool isStatic, bool isOverride)
Parameters
AccessModifier access

System.Type returnType

System.String name

System.Boolean isStatic

System.Boolean isOverride

BeginMethod(AccessModifier, Type, String, Type[], String[])
Not yet documented.
public void BeginMethod(AccessModifier access, Type returnType, string name, Type[] args, string[] argNames)
Parameters
AccessModifier access

System.Type returnType

System.String name

System.Type[] args

System.String[] argNames

BeginMethod(AccessModifier, Type, String, Type[], String[], Boolean, Boolean, Boolean)
Not yet documented.
public void BeginMethod(AccessModifier access, Type returnType, string name, Type[] args, string[] argNames, bool isStatic, bool isOverride, bool isExtension)
Parameters
AccessModifier access

System.Type returnType

System.String name

System.Type[] args

System.String[] argNames

System.Boolean isStatic

System.Boolean isOverride

System.Boolean isExtension

BeginProperty(AccessModifier, Type, String, Boolean)
Not yet documented.
public void BeginProperty(AccessModifier access, Type propertyType, string name, bool isStatic = false)
Parameters
AccessModifier access

System.Type propertyType

System.String name

System.Boolean isStatic

BeginSegment()
Not yet documented.
public void BeginSegment()
BeginSetter(Nullable<AccessModifier>)
Not yet documented.
public void BeginSetter(AccessModifier? access = default(AccessModifier? ))
Parameters
System.Nullable<AccessModifier> access

BeginType(AccessModifier, TypeDeclaration, String)
Not yet documented.
public void BeginType(AccessModifier accessModifier, TypeDeclaration declaration, string typeName)
Parameters
AccessModifier accessModifier

TypeDeclaration declaration

System.String typeName

BeginType(AccessModifier, TypeDeclaration, String, Type, Type[])
Not yet documented.
public void BeginType(AccessModifier accessModifier, TypeDeclaration declaration, string typeName, Type inheritsFrom, params Type[] implementInterfaces)
Parameters
AccessModifier accessModifier

TypeDeclaration declaration

System.String typeName

System.Type inheritsFrom

System.Type[] implementInterfaces

Dispose()
Not yet documented.
public void Dispose()
EmptyLine()
Not yet documented.
public void EmptyLine()
EndConstructor()
Not yet documented.
public void EndConstructor()
EndGetter()
Not yet documented.
public void EndGetter()
EndMethod()
Not yet documented.
public void EndMethod()
EndProperty()
Not yet documented.
public void EndProperty()
EndSegment(String)
Not yet documented.
public void EndSegment(string add = null)
Parameters
System.String add

EndSetter()
Not yet documented.
public void EndSetter()
EndType()
Not yet documented.
public void EndType()
GetFinalCode()
Not yet documented.
public string GetFinalCode()
Returns
System.String

NewLine()
Not yet documented.
public void NewLine()
PasteChunk(String)
Not yet documented.
public void PasteChunk(string chunk)
Parameters
System.String chunk

RegisterTypeSeen(Type)
Not yet documented.
public void RegisterTypeSeen(Type type)
Parameters
System.Type type

RegisterTypesSeen(IEnumerable<Type>)
Not yet documented.
public void RegisterTypesSeen(IEnumerable<Type> types)
Parameters
System.Collections.Generic.IEnumerable<System.Type> types

RegisterTypesSeen(Type[])
Not yet documented.
public void RegisterTypesSeen(params Type[] types)
Parameters
System.Type[] types

UseNamespace(String)
Not yet documented.
public void UseNamespace(string nameSpace)
Parameters
System.String nameSpace

Write(String)
Not yet documented.
public void Write(string content)
Parameters
System.String content

WriteAttribute(Type, String, Type[])
Not yet documented.
public void WriteAttribute(Type attributeType, string paramsContent = null, params Type[] usingExtraTypes)
Parameters
System.Type attributeType

System.String paramsContent

System.Type[] usingExtraTypes

WriteAutoProperty(AccessModifier, Type, String, Nullable<AccessModifier>)
Not yet documented.
public void WriteAutoProperty(AccessModifier access, Type propertyType, string name, AccessModifier? writeAccess)
Parameters
AccessModifier access

System.Type propertyType

System.String name

System.Nullable<AccessModifier> writeAccess

WriteComment(String)
Not yet documented.
public void WriteComment(string content)
Parameters
System.String content

WriteField(AccessModifier, Type, String)
Not yet documented.
public void WriteField(AccessModifier access, Type fieldType, string name)
Parameters
AccessModifier access

System.Type fieldType

System.String name

WriteLine(String)
Not yet documented.
public void WriteLine(string content)
Parameters
System.String content

WriteLine(String, Object[])
Not yet documented.
public void WriteLine(string content, params object[] args)
Parameters
System.String content

System.Object[] args

WriteLineIndentation()
Not yet documented.
public void WriteLineIndentation()

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.