当前位置: 首页>>代码示例>>C#>>正文


C# IEnumerable.AsReadOnly方法代码示例

本文整理汇总了C#中IEnumerable.AsReadOnly方法的典型用法代码示例。如果您正苦于以下问题:C# IEnumerable.AsReadOnly方法的具体用法?C# IEnumerable.AsReadOnly怎么用?C# IEnumerable.AsReadOnly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IEnumerable的用法示例。


在下文中一共展示了IEnumerable.AsReadOnly方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DbDeclaration

 public DbDeclaration(IEnumerable<DbVariableDeclaration> variables, 
     DbSelectExpression source)
     : base(DbExpressionType.Declaration, typeof(void))
 {
     _variables = variables.AsReadOnly();
     _source = source;
 }
开发者ID:radischevo,项目名称:Radischevo.Wahha,代码行数:7,代码来源:DbDeclaration.cs

示例2: QueryCommand

 public QueryCommand(string commandText, IEnumerable<QueryParameter> parameters, 
     IEnumerable<DbColumnExpression> columns)
 {
     this.commandText = commandText;
     this.parameters = parameters.AsReadOnly();
     this.columns = columns.AsReadOnly();
 }
开发者ID:radischevo,项目名称:Radischevo.Wahha,代码行数:7,代码来源:QueryCommand.cs

示例3: JsMethod

 public JsMethod(IMember csharpMember, string name, IEnumerable<string> typeParameterNames, JsFunctionDefinitionExpression definition)
 {
     CSharpMember       = csharpMember;
     Name               = name;
     TypeParameterNames = typeParameterNames.AsReadOnly();
     Definition         = definition;
 }
开发者ID:JimmyJune,项目名称:SaltarelleCompiler,代码行数:7,代码来源:JsMethod.cs

示例4: DbFunctionExpression

 public DbFunctionExpression(Type type, string name, 
     IEnumerable<Expression> arguments)
     : base(DbExpressionType.Function, type)
 {
     _name = name;
     _arguments = arguments.AsReadOnly();
 }
开发者ID:radischevo,项目名称:Radischevo.Wahha,代码行数:7,代码来源:DbFunctionExpression.cs

示例5: JsSwitchSection

		public JsSwitchSection(IEnumerable<JsExpression> values, JsStatement body) {
			if (values == null) throw new ArgumentNullException("values");
			if (body == null) throw new ArgumentNullException("body");
			Values = values.AsReadOnly();
			if (Values.Count == 0) throw new ArgumentException("Values cannot be empty", "values");
			Body = JsStatement.EnsureBlock(body);
		}
开发者ID:ShuntaoChen,项目名称:SaltarelleCompiler,代码行数:7,代码来源:JsSwitchSection.cs

示例6: DbInsertExpression

 public DbInsertExpression(DbTableExpression table, 
     IEnumerable<DbColumnAssignment> assignments)
     : base(DbExpressionType.Insert, typeof(int))
 {
     _table = table;
     _assignments = assignments.AsReadOnly();
 }
开发者ID:radischevo,项目名称:Radischevo.Wahha,代码行数:7,代码来源:DbInsertExpression.cs

示例7: DbUpdateExpression

 public DbUpdateExpression(DbTableExpression table, 
     Expression where, IEnumerable<DbColumnAssignment> assignments)
     : base(DbExpressionType.Update, typeof(int))
 {
     _table = table;
     _where = where;
     _assignments = assignments.AsReadOnly();
 }
开发者ID:radischevo,项目名称:Radischevo.Wahha,代码行数:8,代码来源:DbUpdateExpression.cs

示例8: DbClientJoinExpression

 public DbClientJoinExpression(DbProjectionExpression projection, 
     IEnumerable<Expression> outerKey, IEnumerable<Expression> innerKey)
     : base(DbExpressionType.ClientJoin, projection.Type)
 {
     _outerKey = outerKey.AsReadOnly();
     _innerKey = innerKey.AsReadOnly();
     _projection = projection;
 }
开发者ID:radischevo,项目名称:Radischevo.Wahha,代码行数:8,代码来源:DbClientJoinExpression.cs

示例9: JsMethod

 public JsMethod(IMember csharpMember, string name, IEnumerable<string> typeParameterNames, JsFunctionDefinitionExpression definition)
 {
     Require.ValidJavaScriptIdentifier(name, "name");
     CSharpMember       = csharpMember;
     Name               = name;
     TypeParameterNames = typeParameterNames.AsReadOnly();
     Definition         = definition;
 }
开发者ID:tml,项目名称:SaltarelleCompiler,代码行数:8,代码来源:JsMethod.cs

示例10: SelectClauseExpression

        public SelectClauseExpression(IEnumerable<SelectorExpression> selectors, bool distinct)
        {
            _nodeType = CqlExpressionType.SelectColumns;
            _distinct = distinct;

            _selectors = selectors.AsReadOnly();
            for (int i = 0; i < _selectors.Count; i++)
                _selectors[i].Ordinal = i;
        }
开发者ID:reuzel,项目名称:CqlSharp,代码行数:9,代码来源:SelectClauseExpression.cs

示例11: SelectorExpression

        public SelectorExpression(MethodInfo function, IEnumerable<SelectorExpression> arguments)
        {
            if (function.DeclaringType != typeof (CqlFunctions))
                throw new ArgumentException("function must be a valid Cql Function");

            _function = function;
            _arguments = arguments.AsReadOnly();
            _type = function.ReturnType;
            _selectorType = CqlExpressionType.FunctionSelector;
        }
开发者ID:reuzel,项目名称:CqlSharp.Linq,代码行数:10,代码来源:SelectorExpression.cs

示例12: DbSelectExpression

 public DbSelectExpression(DbTableAlias alias,
     IEnumerable<DbColumnDeclaration> columns,
     Expression from, Expression where,
     IEnumerable<DbOrderExpression> orderBy,
     IEnumerable<Expression> groupBy,
     bool isDistinct, Expression skip, Expression take)
     : base(DbExpressionType.Select, typeof(void), alias)
 {
     _isDistinct = isDistinct;
     _columns = columns.AsReadOnly();
     _from = from;
     _where = where;
     _orderBy = orderBy.AsReadOnly();
     _groupBy = groupBy.AsReadOnly();
     _take = take;
     _skip = skip;
 }
开发者ID:radischevo,项目名称:Radischevo.Wahha,代码行数:17,代码来源:DbSelectExpression.cs

示例13: TermExpression

 private TermExpression(TermExpression original, IEnumerable<TermExpression> terms,
                        IDictionary<TermExpression, TermExpression> dictTerms)
 {
     _function = original.Function;
     _termType = original._termType;
     _type = original.Type;
     _value = original.Value;
     _terms = terms.AsReadOnly();
     _dictionaryTerms = dictTerms.AsReadOnly();
 }
开发者ID:reuzel,项目名称:CqlSharp,代码行数:10,代码来源:TermExpression.cs

示例14: IRMultiUnit

 public IRMultiUnit(IEnumerable<IIRUnit> inner)
 {
     Inner = inner.AsReadOnly();
 }
开发者ID:CryZe,项目名称:GekkoAssembler,代码行数:4,代码来源:IRMultiUnit.cs

示例15: Json

 public static ConstructorScriptSemantics Json(IEnumerable<IMember> parameterToMemberMap)
 {
     return new ConstructorScriptSemantics { Type = ImplType.Json, _parameterToMemberMap = parameterToMemberMap.AsReadOnly(), GenerateCode = false };
 }
开发者ID:unintelligible,项目名称:SaltarelleCompiler,代码行数:4,代码来源:ConstructorScriptSemantics.cs


注:本文中的IEnumerable.AsReadOnly方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。