本文整理汇总了C#中StyleCop.CSharp.CodeModel.CodeUnitProxy类的典型用法代码示例。如果您正苦于以下问题:C# CodeUnitProxy类的具体用法?C# CodeUnitProxy怎么用?C# CodeUnitProxy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CodeUnitProxy类属于StyleCop.CSharp.CodeModel命名空间,在下文中一共展示了CodeUnitProxy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Interface
/// <summary>
/// Initializes a new instance of the Interface class.
/// </summary>
/// <param name="proxy">Proxy object for the interface.</param>
/// <param name="name">The name of the interface.</param>
/// <param name="attributes">The list of attributes attached to this element.</param>
/// <param name="typeConstraints">The list of type constraints on the class, if any.</param>
/// <param name="unsafeCode">Indicates whether the element resides within a block of unsafe code.</param>
internal Interface(CodeUnitProxy proxy, string name, ICollection<Attribute> attributes, ICollection<TypeParameterConstraintClause> typeConstraints, bool unsafeCode)
: base(proxy, ElementType.Interface, name, attributes, typeConstraints, unsafeCode)
{
Param.AssertNotNull(proxy, "proxy");
Param.AssertValidString(name, "name");
Param.Ignore(attributes, typeConstraints, unsafeCode);
}
示例2: Statement
/// <summary>
/// Initializes a new instance of the Statement class.
/// </summary>
/// <param name="proxy">Proxy object for the statement.</param>
/// <param name="type">The type of the statement.</param>
internal Statement(CodeUnitProxy proxy, StatementType type)
: base(proxy, (int)type)
{
Param.AssertNotNull(proxy, "proxy");
Param.Ignore(type);
CsLanguageService.Debug.Assert(System.Enum.IsDefined(typeof(StatementType), this.StatementType), "The type is invalid.");
}
示例3: Enum
/// <summary>
/// Initializes a new instance of the Enum class.
/// </summary>
/// <param name="proxy">Proxy object for the enum.</param>
/// <param name="name">The name of the enum.</param>
/// <param name="attributes">The list of attributes attached to this element.</param>
/// <param name="unsafeCode">Indicates whether the element resides within a block of unsafe code.</param>
internal Enum(CodeUnitProxy proxy, string name, ICollection<Attribute> attributes, bool unsafeCode)
: base(proxy, ElementType.Enum, name, attributes, unsafeCode)
{
Param.AssertNotNull(proxy, "proxy");
Param.AssertValidString(name, "name");
Param.Ignore(attributes, unsafeCode);
}
示例4: GenericTypeToken
/// <summary>
/// Initializes a new instance of the GenericTypeToken class.
/// </summary>
/// <param name="proxy">Proxy object for the statement.</param>
internal GenericTypeToken(CodeUnitProxy proxy)
: base(proxy)
{
Param.AssertGreaterThanOrEqualTo(proxy.Children.Count, 3, "childTokens");
this.IsGeneric = true;
}
示例5: Expression
/// <summary>
/// Initializes a new instance of the Expression class.
/// </summary>
/// <param name="proxy">Proxy object for the expression.</param>
/// <param name="type">The type of the expression.</param>
internal Expression(CodeUnitProxy proxy, int type)
: base(proxy, type)
{
Param.AssertNotNull(proxy, "proxy");
Param.Ignore(type);
CsLanguageService.Debug.Assert(System.Enum.IsDefined(typeof(ExpressionType), this.ExpressionType), "The type is invalid.");
}
示例6: PreprocessorDirective
/// <summary>
/// Initializes a new instance of the PreprocessorDirective class.
/// </summary>
/// <param name="proxy">Proxy object for the directive.</param>
/// <param name="preprocessorType">The type of the preprocessor.</param>
internal PreprocessorDirective(CodeUnitProxy proxy, PreprocessorType preprocessorType)
: base(proxy, (int)preprocessorType)
{
Param.AssertNotNull(proxy, "proxy");
Param.Ignore(preprocessorType);
CsLanguageService.Debug.Assert(System.Enum.IsDefined(typeof(PreprocessorType), this.PreprocessorType), "The type is invalid.");
}
示例7: ThrowStatement
/// <summary>
/// Initializes a new instance of the ThrowStatement class.
/// </summary>
/// <param name="proxy">Proxy object for the statement.</param>
/// <param name="thrownExpression">The expression being thrown, if any.</param>
internal ThrowStatement(CodeUnitProxy proxy, Expression thrownExpression)
: base(proxy, StatementType.Throw)
{
Param.Ignore(proxy);
Param.Ignore(thrownExpression);
this.thrownExpression.Value = thrownExpression;
}
示例8: LabelStatement
/// <summary>
/// Initializes a new instance of the LabelStatement class.
/// </summary>
/// <param name="proxy">Proxy object for the statement.</param>
/// <param name="identifier">The label identifier.</param>
internal LabelStatement(CodeUnitProxy proxy, LiteralExpression identifier)
: base(proxy, StatementType.Label)
{
Param.AssertNotNull(proxy, "proxy");
Param.AssertNotNull(identifier, "identifier");
this.identifier.Value = identifier;
}
示例9: UnsafeStatement
/// <summary>
/// Initializes a new instance of the UnsafeStatement class.
/// </summary>
/// <param name="proxy">Proxy object for the statement.</param>
/// <param name="body">The body of the try-statement.</param>
internal UnsafeStatement(CodeUnitProxy proxy, BlockStatement body)
: base(proxy, StatementType.Unsafe)
{
Param.AssertNotNull(proxy, "proxy");
Param.AssertNotNull(body, "body");
this.body.Value = body;
}
示例10: QueryWhereClause
/// <summary>
/// Initializes a new instance of the QueryWhereClause class.
/// </summary>
/// <param name="proxy">Proxy object for the clause.</param>
/// <param name="expression">The expression.</param>
internal QueryWhereClause(CodeUnitProxy proxy, Expression expression)
: base(proxy, QueryClauseType.Where)
{
Param.AssertNotNull(proxy, "proxy");
Param.AssertNotNull(expression, "expression");
this.expression.Value = expression;
}
示例11: UsingStatement
/// <summary>
/// Initializes a new instance of the UsingStatement class.
/// </summary>
/// <param name="proxy">Proxy object for the statement.</param>
/// <param name="resource">The resource aquisition expression declared in the using statement.</param>
internal UsingStatement(CodeUnitProxy proxy, Expression resource)
: base(proxy, StatementType.Using)
{
Param.AssertNotNull(proxy, "proxy");
Param.AssertNotNull(resource, "resource");
this.resource.Value = resource;
}
示例12: ComplexToken
/// <summary>
/// Initializes a new instance of the ComplexToken class.
/// </summary>
/// <param name="proxy">Proxy object for the statement.</param>
/// <param name="tokenType">The type of the token.</param>
internal ComplexToken(CodeUnitProxy proxy, TokenType tokenType)
: base(proxy, tokenType)
{
Param.AssertNotNull(proxy, "proxy");
Param.Ignore(tokenType);
this.IsComplexToken = true;
}
示例13: VariableDeclarationStatement
/// <summary>
/// Initializes a new instance of the VariableDeclarationStatement class.
/// </summary>
/// <param name="proxy">Proxy object for the statement.</param>
/// <param name="expression">The inner expression.</param>
internal VariableDeclarationStatement(CodeUnitProxy proxy, VariableDeclarationExpression expression)
: base(proxy, StatementType.VariableDeclaration)
{
Param.AssertNotNull(proxy, "proxy");
Param.AssertNotNull(expression, "expression");
this.expression.Value = expression;
}
示例14: ArgumentList
/// <summary>
/// Initializes a new instance of the ArgumentList class.
/// </summary>
/// <param name="proxy">The proxy class.</param>
/// <param name="arguments">The collection of arguments within the list.</param>
internal ArgumentList(CodeUnitProxy proxy, IEnumerable<Argument> arguments)
: base(proxy, CodeUnitType.ArgumentList)
{
Param.AssertNotNull(proxy, "proxy");
Param.AssertNotNull(arguments, "arguments");
this.arguments.Value = new List<Argument>(arguments);
}
示例15: StackallocExpression
/// <summary>
/// Initializes a new instance of the StackallocExpression class.
/// </summary>
/// <param name="proxy">Proxy object for the expression.</param>
/// <param name="type">The array type.</param>
internal StackallocExpression(CodeUnitProxy proxy, ArrayAccessExpression type)
: base(proxy, ExpressionType.Stackalloc)
{
Param.AssertNotNull(proxy, "proxy");
Param.AssertNotNull(type, "type");
this.type.Value = type;
}