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


C# IEnumerable.ToReadOnlyCollection方法代码示例

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


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

示例1: DataStatementAst

 public DataStatementAst(IScriptExtent extent, string variableName, IEnumerable<ExpressionAst> commandsAllowed, StatementBlockAst body)
     : base(extent)
 {
     this.Variable = variableName;
     this.CommandsAllowed = commandsAllowed.ToReadOnlyCollection();
     this.Body = body;
 }
开发者ID:mauve,项目名称:Pash,代码行数:7,代码来源:DataStatementAst.cs

示例2: PropertyDefinitionExpression

 public PropertyDefinitionExpression(string propertyName, Type propertyType, bool isPredeclaration, IEnumerable<string> modifiers)
 {
     this.PropertyType = propertyType;
     this.PropertyName = propertyName;
     this.IsPredeclaration = isPredeclaration;
     this.Modifiers = modifiers.ToReadOnlyCollection();
 }
开发者ID:samcook,项目名称:Fickle,代码行数:7,代码来源:PropertyDefinitionExpression.cs

示例3: Root

        public Root(TaskData taskData, IEnumerable<Color> folderColorOptions)
        {
            Contract.Requires(null != taskData, "taskData");
            m_taskData = taskData;

            Contract.Requires(null != folderColorOptions, "folderColorOptions");
            m_folderColorOptions = folderColorOptions.ToReadOnlyCollection();

            Tasks = new TaskListViewModel(taskData, filter);
            Timeline = new TimelineViewModel(Tasks.AllTasks);

            Filters = new Filters(taskData);
            Folders = new Folders(taskData);

            taskData.PropertyChanged += (sender, args) =>
            {
                if (args.PropertyName == "CurrentFolder" || args.PropertyName == "Filter")
                {
                    Tasks.RefreshFilter();
                }
            };

            DispatcherTimer dateChanger = new DispatcherTimer();
            dateChanger.Interval = TimeSpan.FromMinutes(1);
            dateChanger.Tick += new EventHandler(dateChanger_Tick);
            Tasks.RefreshFilter();
        }
开发者ID:x-skywalker,项目名称:Tasks.Show,代码行数:27,代码来源:Root.cs

示例4: ExecutionPlan

 internal ExecutionPlan( IEnumerable<IPluginInfo> pluginsToStart, IEnumerable<IPluginInfo> pluginsToStop, IReadOnlyCollection<IPluginInfo> pluginsToDisable )
 {
     Debug.Assert( pluginsToStart != null && pluginsToStop != null && pluginsToDisable != null );
     PluginsToStart = pluginsToStart.ToReadOnlyCollection();
     PluginsToStop = pluginsToStop.ToReadOnlyCollection();
     PluginsToDisable = pluginsToDisable;
 }
开发者ID:Nementon,项目名称:ck-desktop,代码行数:7,代码来源:ExecutionPlan.cs

示例5: SimpleLambdaExpression

 public SimpleLambdaExpression(Type returnType, Expression body, IEnumerable<Expression> variables, params Expression[] parameters)
 {
     this.ReturnType = returnType;
     this.Body = body;
     this.Variables = variables.ToReadOnlyCollection();
     this.Parameters = parameters.ToReadOnlyCollection();
 }
开发者ID:samcook,项目名称:Fickle,代码行数:7,代码来源:SimpleLambdaExpression.cs

示例6: ContentTypeDefinition

 public ContentTypeDefinition(string name, string displayName, IEnumerable<ContentTypePartDefinition> parts, SettingsDictionary settings)
 {
     Name = name;
     DisplayName = displayName;
     Parts = parts.ToReadOnlyCollection();
     Settings = settings;
 }
开发者ID:Giahim,项目名称:Brochard,代码行数:7,代码来源:ContentTypeDefinition.cs

示例7: TryStatementAst

 public TryStatementAst(IScriptExtent extent, StatementBlockAst body, IEnumerable<CatchClauseAst> catchClauses, StatementBlockAst @finally)
     : base(extent)
 {
     this.Body = body;
     this.CatchClauses = catchClauses.ToReadOnlyCollection();
     this.Finally = @finally;
 }
开发者ID:mauve,项目名称:Pash,代码行数:7,代码来源:TryStatementAst.cs

示例8: ServiceModel

 public ServiceModel(ServiceModelInfo serviceModelInfo, IEnumerable<ServiceEnum> enums, IEnumerable<ServiceClass> classes, IEnumerable<ServiceGateway> gateways)
 {
     this.ServiceModelInfo = serviceModelInfo ?? new ServiceModelInfo();
     this.Enums = enums.ToReadOnlyCollection();
     this.Classes = classes.ToReadOnlyCollection();
     this.Gateways = gateways.ToReadOnlyCollection();
 }
开发者ID:samcook,项目名称:Fickle,代码行数:7,代码来源:ServiceModel.cs

示例9: ParameterAst

 public ParameterAst(IScriptExtent extent, VariableExpressionAst name, IEnumerable<AttributeBaseAst> attributes, ExpressionAst defaultValue)
     : base(extent)
 {
     this.Name = name;
     this.Attributes = attributes.ToReadOnlyCollection();
     this.DefaultValue = defaultValue;
 }
开发者ID:JamesTryand,项目名称:Pash2,代码行数:7,代码来源:ParameterAst.cs

示例10: SwitchStatementAst

 public SwitchStatementAst(IScriptExtent extent, string label, PipelineBaseAst condition, SwitchFlags flags, IEnumerable<Tuple<ExpressionAst, StatementBlockAst>> clauses, StatementBlockAst @default)
     : base(extent, label, condition)
 {
     this.Flags = flags;
     this.Clauses = clauses.ToReadOnlyCollection();
     this.Default = @default;
 }
开发者ID:mauve,项目名称:Pash,代码行数:7,代码来源:SwitchStatementAst.cs

示例11: FunctionDefinitionAst

 public FunctionDefinitionAst(IScriptExtent extent, bool isFilter, bool isWorkflow, string name, IEnumerable<ParameterAst> parameters, ScriptBlockAst body)
     : base(extent)
 {
     this.IsFilter = isFilter;
     this.IsWorkflow = isWorkflow;
     this.Name = name;
     this.Parameters = parameters.ToReadOnlyCollection();
     this.Body = body;
 }
开发者ID:mauve,项目名称:Pash,代码行数:9,代码来源:FunctionDefinitionAst.cs

示例12: FunctionInfo

 internal FunctionInfo(string name, ScriptBlock function, IEnumerable<ParameterAst> explicitParams,
                       ScopedItemOptions options)
     : base(name, CommandTypes.Function)
 {
     ScriptBlock = function;
     Options = options;
     ScopeUsage = ScopeUsages.NewScope;
     _explicitParameters = explicitParams == null ? new ReadOnlyCollection<ParameterAst>(new ParameterAst[0])
                                                  : explicitParams.ToReadOnlyCollection();
 }
开发者ID:mauve,项目名称:Pash,代码行数:10,代码来源:FunctionInfo.cs

示例13: CommandKeyBindingSnapshot

 public CommandKeyBindingSnapshot(
     CommandListSnapshot snapshot,
     IEnumerable<KeyInput> vimFirstKeyInputs,
     IEnumerable<CommandKeyBinding> removed,
     IEnumerable<CommandKeyBinding> conflicting)
 {
     _commandListSnapshot = snapshot;
     _vimFirstKeyInputs = vimFirstKeyInputs.ToReadOnlyCollection();
     _removedBindings = removed.ToReadOnlyCollection();
     _conflictingBindings = conflicting.ToReadOnlyCollection();
 }
开发者ID:honeyhoneywell,项目名称:VsVim,代码行数:11,代码来源:CommandKeyBindingSnapshot.cs

示例14: MethodDefinitionExpression

 public MethodDefinitionExpression(string name, ReadOnlyCollection<Expression> parameters, AccessModifiers accessModifiers, Type returnType, Expression body, bool isPredeclaration, string rawAttributes = "", ReadOnlyDictionary<string, string> attributes = null, IEnumerable<Exception> exceptions = null)
 {
     this.RawAttributes = rawAttributes;
     this.Attributes = attributes ?? new ReadOnlyDictionary<string, string>(new Dictionary<string, string>());
     this.Name = name;
     this.AccessModifiers = accessModifiers;
     this.ReturnType = returnType;
     this.Parameters = parameters;
     this.Body = body;
     this.IsPredeclaration = isPredeclaration;
     this.Exceptions = exceptions == null ? null : exceptions.ToReadOnlyCollection();
 }
开发者ID:techpub,项目名称:Fickle,代码行数:12,代码来源:MethodDefinitionExpression.cs

示例15: SqlForeignKeyConstraintExpression

		public SqlForeignKeyConstraintExpression(string constraintName, IEnumerable<string> columnNames, SqlReferencesColumnExpression referencesColumnExpression)
			: this(constraintName, columnNames.ToReadOnlyCollection(), referencesColumnExpression)
		{	
		}
开发者ID:crazle,项目名称:Shaolinq,代码行数:4,代码来源:SqlForeignKeyConstraintExpression.cs


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