本文整理汇总了C#中IList.AsArray方法的典型用法代码示例。如果您正苦于以下问题:C# IList.AsArray方法的具体用法?C# IList.AsArray怎么用?C# IList.AsArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IList
的用法示例。
在下文中一共展示了IList.AsArray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GlobalCode
/// <summary>
/// Initializes a new instance of the GlobalCode class.
/// </summary>
public GlobalCode(IList<Statement>/*!*/ statements, SourceUnit/*!*/ sourceUnit)
{
Debug.Assert(statements != null && sourceUnit != null);
this.sourceUnit = sourceUnit;
this.statements = statements.AsArray();
}
示例2: EchoStmt
public EchoStmt(Text.Span span, IList<Expression>/*!*/ parameters)
: base(span)
{
Debug.Assert(parameters != null);
this.parameters = parameters.AsArray();
this.isHtmlCode = false;
}
示例3: SwitchStmt
public SwitchStmt(Text.Span span, Expression/*!*/ switchValue, IList<SwitchItem>/*!*/ switchItems)
: base(span)
{
Debug.Assert(switchValue != null && switchItems != null);
this.switchValue = switchValue;
this.switchItems = switchItems.AsArray();
}
示例4: TryStmt
public TryStmt(Text.Span p, IList<Statement>/*!*/ statements, List<CatchItem> catches, FinallyItem finallyItem)
: base(p)
{
Debug.Assert(statements != null);
this.statements = statements.AsArray();
this.catches = catches.AsArray();
this.finallyItem = finallyItem;
}
示例5: BlockStmt
public BlockStmt(Text.Span span, IList<Statement>/*!*/body)
: base(span)
{
Debug.Assert(body != null);
_statements = body.AsArray();
}
示例6: FunctionDecl
public FunctionDecl(SourceUnit/*!*/ sourceUnit,
Text.Span span, Text.Span entireDeclarationPosition, int headingEndPosition, int declarationBodyPosition,
bool isConditional, Scope scope, PhpMemberAttributes memberAttributes, string/*!*/ name, NamespaceDecl ns,
bool aliasReturn, List<FormalParam>/*!*/ formalParams, List<FormalTypeParam>/*!*/ genericParams,
IList<Statement>/*!*/ body, List<CustomAttribute> attributes)
: base(span)
{
Debug.Assert(genericParams != null && name != null && formalParams != null && body != null);
this.name = new Name(name);
this.ns = ns;
this.signature = new Signature(aliasReturn, formalParams);
this.typeSignature = new TypeSignature(genericParams);
if (attributes != null && attributes.Count != 0)
this.Attributes = new CustomAttributes(attributes);
this.body = body.AsArray();
this.entireDeclarationPosition = entireDeclarationPosition;
this.headingEndPosition = headingEndPosition;
this.declarationBodyPosition = declarationBodyPosition;
this.IsConditional = isConditional;
this.MemberAttributes = memberAttributes;
this.Scope = scope;
this.SourceUnit = sourceUnit;
}
示例7: Signature
public Signature(bool aliasReturn, IList<FormalParam>/*!*/ formalParams)
{
this.aliasReturn = aliasReturn;
this.formalParams = formalParams.AsArray();
}
示例8: TypeSignature
public TypeSignature(IList<FormalTypeParam>/*!!*/ typeParams)
{
Debug.Assert(typeParams != null);
this.typeParams = typeParams.AsArray();
}
示例9: MethodDecl
public MethodDecl(Text.Span span, Text.Span entireDeclarationPosition, int headingEndPosition, int declarationBodyPosition,
string name, bool aliasReturn, IList<FormalParam>/*!*/ formalParams, IList<FormalTypeParam>/*!*/ genericParams,
IList<Statement> body, PhpMemberAttributes modifiers, IList<ActualParam> baseCtorParams,
List<CustomAttribute> attributes)
: base(span, attributes)
{
Debug.Assert(genericParams != null && formalParams != null);
this.modifiers = modifiers;
this.name = new Name(name);
this.signature = new Signature(aliasReturn, formalParams);
this.typeSignature = new TypeSignature(genericParams);
this.body = (body != null) ? body.AsArray() : null;
this.baseCtorParams = (baseCtorParams != null) ? baseCtorParams.AsArray() : null;
this.entireDeclarationSpan = entireDeclarationPosition;
this.headingEndPosition = headingEndPosition;
this.declarationBodyPosition = declarationBodyPosition;
}
示例10: FinallyItem
public FinallyItem(Text.Span span, IList<Statement>/*!*/statements)
: base(span)
{
this.statements = statements.AsArray();
}
示例11: CatchItem
public CatchItem(Text.Span p, DirectTypeRef tref, DirectVarUse/*!*/ variable,
IList<Statement>/*!*/ statements)
: base(p)
{
Debug.Assert(variable != null && statements != null);
this.tref = tref;
this.variable = variable;
this.statements = statements.AsArray();
}
示例12: LambdaFunctionExpr
public LambdaFunctionExpr(SourceUnit/*!*/ sourceUnit,
Text.Span span, Text.Span entireDeclarationPosition, int headingEndPosition, int declarationBodyPosition,
Scope scope, NamespaceDecl ns,
bool aliasReturn, List<FormalParam>/*!*/ formalParams, List<FormalParam> useParams,
IList<Statement>/*!*/ body)
: base(span)
{
Debug.Assert(formalParams != null && body != null);
Debug.Assert(sourceUnit != null);
this.sourceUnit = sourceUnit;
this.ns = ns;
this.signature = new Signature(aliasReturn, formalParams);
this.useParams = useParams;
//this.typeSignature = new TypeSignature(genericParams);
//this.attributes = new CustomAttributes(attributes);
this.body = body.AsArray();
this.entireDeclarationPosition = entireDeclarationPosition;
this.headingEndPosition = headingEndPosition;
this.declarationBodyPosition = declarationBodyPosition;
}
示例13: CallSignature
/// <summary>
/// Initialize new instance of <see cref="CallSignature"/>.
/// </summary>
/// <param name="parameters">List of parameters.</param>
/// <param name="genericParams">List of type parameters for generics.</param>
public CallSignature(IList<ActualParam> parameters, IList<TypeRef> genericParams)
{
this.parameters = parameters.AsArray();
this.GenericParams = genericParams.AsArray();
}
示例14: SwitchItem
protected SwitchItem(Text.Span span, IList<Statement>/*!*/ statements)
: base(span)
{
Debug.Assert(statements != null);
this.statements = statements.AsArray();
}
示例15: ArrayEx
public ArrayEx(Text.Span span, IList<Item>/*!*/items)
: base(span)
{
Debug.Assert(items != null);
this.items = items.AsArray();
}