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


C# ImmutableList.Select方法代码示例

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


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

示例1: CreateFilter

            public static EventFilter CreateFilter(EventKind internalEventKind, JvmtiEnvironment environment, JniEnvironment nativeEnvironment, RequestId requestId, SuspendPolicy suspendPolicy, ImmutableList<EventRequestModifier> modifiers)
            {
                if (modifiers.Count == 0)
                    return new PassThroughEventFilter(internalEventKind, requestId, suspendPolicy, modifiers);

                EventFilter[] elements = modifiers.Select(modifier => CreateFilter(internalEventKind, environment, nativeEnvironment, requestId, suspendPolicy, modifiers, modifier)).ToArray();
                if (elements.Length == 1)
                    return elements[0];

                return new AggregateEventFilter(internalEventKind, requestId, suspendPolicy, modifiers, elements);
            }
开发者ID:Kav2018,项目名称:JavaForVS,代码行数:11,代码来源:DebugProtocolService.EventFilter.cs

示例2: CreateCloudWords

        public ImmutableList<TagCloudWord> CreateCloudWords(ImmutableList<FrequencyWord> frequencyWords)
        {
            var freqs = frequencyWords
                .Select(x => x.Frequency)
                .Distinct()
                .OrderByDescending(x => x)
                .ToImmutableList();

            using (fontSelector.Configure(freqs))
                using (brushSelector.Configure(freqs))
                    using (rectSelector.Configure(freqs))
                        return CreateCloudWordUsingSelectors(frequencyWords).ToImmutableList();
        }
开发者ID:xackill,项目名称:03-design-hw,代码行数:13,代码来源:SquareAlgorithm.cs

示例3: GetModels

        private static IReadOnlyList<TypeScriptClass> GetModels(ImmutableList<SourceFileProcessor> processors)
        {
            var models = new List<TypeScriptClass>();

            var classNames = processors.Select(p => p.ClassName).ToImmutableList();
            var classNamesToProperties = processors.ToDictionary(processor => processor.ClassName, processor => processor.GetProperties(classNames));

            foreach (var classToProperty in classNamesToProperties)
            {
                var references = classToProperty.Value.Where(p => classNames.Contains(p.Type) && p.Type != classToProperty.Key).Select(p => p.Type).Distinct().ToImmutableList();
                models.Add(new TypeScriptClass(classToProperty.Key, classToProperty.Value, references));
            }

            return models.ToImmutableList();
        }
开发者ID:lukeautry,项目名称:DotNetWebSDK,代码行数:15,代码来源:ModelGenerator.cs

示例4: Workspace

        private Workspace(DirectoryInfo dir, Entry tree,
            ImmutableList<string> projects)
        {
            _dir = dir;
            _tree = tree;
            _projects = projects;
            _projectCache = new Lazy<ImmutableList<ProjectEntry>>(() => _projects.Select(p => FindProject(_tree, p)).ToImmutableList());
            _errorList = new Lazy<ImmutableList<DiagnosticMessage>>(() =>
            {
                var diagnostics = ImmutableList.CreateBuilder<DiagnosticMessage>();

                foreach (var project in _projectCache.Value)
                    diagnostics.AddRange(project.Diagnostics);

                return diagnostics.ToImmutable();
            });
        }
开发者ID:Runt-Editor,项目名称:Runt,代码行数:17,代码来源:Workspace.cs

示例5: Step

        private Step(Step step, Tuple<IEnumerable<Cell>, int> pointsNCells)
        {
            height = step.height;
            width = step.width;
            commandIndex = step.commandIndex + 1;
            points = step.points + pointsNCells.Item2;

            Pieces = step.Pieces;
            CurrentPieceCells = Pieces[step.pieceIndex].Cells;
            UsedCells = pointsNCells.Item1.ToImmutableHashSet();
            Center = GetShift(CurrentPieceCells);
            RunningCells = CurrentPieceCells.Select(c => new Cell(c + Center)).ToImmutableHashSet();
            pieceIndex = (step.pieceIndex + 1) % step.Pieces.Count;
        }
开发者ID:dantre,项目名称:Sunday,代码行数:14,代码来源:Antropov_Dmitry.cs

示例6: CreateAggregateMessage

 private static Message CreateAggregateMessage(
     Guid searchTermId,
     ImmutableList<Message> searchResultMessages)
 {
     var aggregateMessage = Message.CreateMessage(
         searchTermId.ToCanonicalString(),
         "Aggregate",
         Predecessors.Set
             .In("SearchResult", searchResultMessages.Select(r => r.Hash)),
         searchTermId,
         new { });
     return aggregateMessage;
 }
开发者ID:michaellperry,项目名称:Commuter,代码行数:13,代码来源:Functions.cs

示例7: DeQueue

 static ImmutableList<Order> DeQueue(ImmutableList<Order> orders, DateTime currentTime)
 {
   return orders.Select(order => order.Status == OrderStatus.InQueue && order.ToTime <= currentTime ? order.With(status: OrderStatus.New, products: order.Products.Select(product => product.With(status: ProductStatus.New)).ToImmutableArray()) : order).ToImmutableList();
 }
开发者ID:undyings,项目名称:Dodo.StateMachine,代码行数:4,代码来源:Main.cs

示例8: Create

 // TODO: param name should be optional
 public static FunctionType Create(ExprType returnType, ImmutableList<Tuple<Option<String>, ExprType>> args, Boolean hasVarArgs) =>
     Create(returnType, args.Select(_ => Tuple.Create(_.Item1.IsSome ? _.Item1.Value : "", _.Item2)).ToList(), hasVarArgs);
开发者ID:phisiart,项目名称:C-Compiler,代码行数:3,代码来源:Types.cs


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