コード例 #1
0
 /// <summary>
 /// Constructor to use when creating a RoslynDom from scratch
 /// </summary>
 /// <param name="name">
 /// Name of the field
 /// </param>
 /// <param name="typeName">
 /// Type name of the field
 /// </param>
 /// <param name="declaredAccessModifier">
 /// The accessibilty (scope) modifier. Default is the most restrictive scope, private.
 /// </param>
 /// <param name="isStatic">
 /// Pass true for an static class
 /// </param>
 /// <param name="isNew">
 /// Pass true for an new class
 /// </param>
 public RDomField(string name, string returnTypeName, AccessModifier declaredAccessModifier = AccessModifier.Private,
                  bool isStatic   = false, bool isNew      = false, bool isReadOnly = false,
                  bool isVolatile = false, bool isConstant = false)
     : this(name, declaredAccessModifier, isStatic, isNew, isReadOnly, isVolatile, isConstant)
 {
     _returnType = new RDomReferencedType(this, returnTypeName);
 }
コード例 #2
0
 public RDomProperty(string name, string propertyTypeName, AccessModifier accessModifier = AccessModifier.Private,
                     bool isAbstract = false, bool isVirtual = false, bool isOverride = false, bool isSealed = false, bool isStatic = false,
                     bool isNew      = false, bool canGet    = false, bool canSet     = false)
     : this(name, accessModifier, isAbstract, isVirtual, isOverride, isSealed,
            isStatic, isNew, canGet, canSet)
 {
     PropertyType = new RDomReferencedType(this, propertyTypeName);
 }
コード例 #3
0
 /// <summary>
 /// Constructor to use when creating a RoslynDom from scratch
 /// </summary>
 /// <param name="name">
 /// Name of the event
 /// </param>
 /// <param name="typeName">
 /// Type name of the event</param>
 /// <param name="accessModifier">
 /// The accessibilty (scope) modifier. Default is the most restrictive scope, private.
 /// </param>
 /// <param name="isAbstract">
 /// Pass true for an abstract class
 /// </param>
 /// <param name="isVirtual">
 /// Pass true for an virtual class
 /// </param>
 /// <param name="isOverride">
 /// Pass true for an override class
 /// </param>
 /// <param name="isSealed">
 /// Pass true for an sealed class
 /// </param>
 /// <param name="isStatic">
 /// Pass true for an static class
 /// </param>
 /// <param name="isNew">
 /// Pass true for an new class
 /// </param>
 public RDomEvent(string name, string typeName, AccessModifier declaredAccessModifier = AccessModifier.Private,
                  bool isAbstract = false, bool isVirtual = false, bool isOverride = false,
                  bool isSealed   = false, bool isStatic  = false, bool isNew      = false)
     : this(name, declaredAccessModifier, isAbstract,
            isVirtual, isOverride, isSealed, isStatic, isNew)
 {
     _type = new RDomReferencedType(this, typeName, true);
 }
コード例 #4
0
 public RDomParameter(string name, string typeName,
                      object defaultValue, LiteralKind defaultValueType, string defaultConstantIdentifier,
                      int ordinal       = 0, bool isOut = false, bool isRef = false,
                      bool isParamArray = false)
     : this(name, defaultValue, defaultValueType, defaultConstantIdentifier, ordinal, isOut, isRef, isParamArray)
 {
     _type = new RDomReferencedType(this, typeName, true);
 }
コード例 #5
0
ファイル: RDomProperty.cs プロジェクト: thinhils/RoslynDOM
 public RDomProperty(string name, string propertyTypeName, AccessModifier declaredAccessModifier = AccessModifier.Private,
                     bool isAbstract = false, bool isVirtual   = false, bool isOverride = false, bool isSealed = false, bool isStatic = false,
                     bool isNew      = false, bool isWriteOnly = false, bool isReadOnly = false)
     : this(name, declaredAccessModifier, isAbstract, isVirtual, isOverride, isSealed,
            isStatic, isNew, isWriteOnly, isReadOnly)
 {
     PropertyType = new RDomReferencedType(this, propertyTypeName);
 }
コード例 #6
0
ファイル: RDomMethod.cs プロジェクト: thinhils/RoslynDOM
 public RDomMethod(string name, string returnTypeName, AccessModifier declaredAccessModifier = AccessModifier.Private,
                   bool isAbstract        = false, bool isVirtual = false, bool isOverride = false, bool isSealed = false,
                   bool isNew             = false, bool isStatic  = false,
                   bool isExtensionMethod = false)
     : this(name, declaredAccessModifier, isAbstract, isVirtual,
            isOverride, isSealed, isNew, isStatic, isExtensionMethod)
 {
     _returnType = new RDomReferencedType(this, returnTypeName);
 }
コード例 #7
0
 // TODO: Fix ambiguous overloads
 public RDomCatchStatement(string exceptionTypeName = null, IVariableDeclaration variable = null,
                           IExpression condition    = null)
     : this(variable, condition)
 {
     if (!string.IsNullOrWhiteSpace(exceptionTypeName))
     {
         _exceptionType = new RDomReferencedType(this, exceptionTypeName, true);
     }
 }
コード例 #8
0
        internal RDomReferencedType(RDomReferencedType oldRDom)
            : base(oldRDom)
        {
            Initialize();

            _name           = oldRDom.Name;
            _namespace      = oldRDom.Namespace;
            _displayAlias   = oldRDom.DisplayAlias;
            _isArray        = oldRDom.IsArray;
            _containingType = oldRDom.ContainingType;
            _typeArguments  = oldRDom.TypeArguments.Copy(this);
        }
コード例 #9
0
ファイル: RDomOperator.cs プロジェクト: thinhils/RoslynDOM
 public RDomOperator(string name, string typeName, Operator op)
     : this(name, op)
 {
     _type = new RDomReferencedType(this, typeName, true);
 }
コード例 #10
0
 protected RDomBaseVariable(string name, string typeName, IExpression initializer, bool isImplicitlyTyped, bool isAliased, VariableKind variableKind)
     : this(name, initializer, isImplicitlyTyped, isAliased, variableKind)
 {
     _type = new RDomReferencedType(this, typeName, isAliased);
 }
コード例 #11
0
 public RDomConversionOperator(string name, string typeName, bool isImplicit)
     : this(name, isImplicit)
 {
     _type = new RDomReferencedType(this, typeName);
 }
コード例 #12
0
ファイル: RDomEnum.cs プロジェクト: thinhils/RoslynDOM
 public RDomEnum(string name, string metadataName, string underlyingTypeName = null, AccessModifier declaredAccessModifier = AccessModifier.Private)
     : this(name, metadataName, declaredAccessModifier)
 {
     _underlyingType = new RDomReferencedType(this, underlyingTypeName, true);
 }
コード例 #13
0
 public RDomClass(string metadataName, string baseTypeName = null, AccessModifier declaredAccessModifier = AccessModifier.Private,
                  bool isAbstract = false, bool isSealed = false, bool isStatic = false, bool isPartial = false)
     : this(metadataName, declaredAccessModifier, isAbstract, isSealed, isStatic, isPartial)
 {
     _baseType = new RDomReferencedType(this, baseTypeName);
 }