/// <summary>
 /// Maak de archive lijst (die altijd plat is) tot een boom.
 /// </summary>
 public static IZipArchiveDirectory AsDirectoryStructure(this System.Collections.ObjectModel.ReadOnlyCollection <ZipArchiveEntry> entries)
 {
     return(Process(entries.Select(e => new ArchivePathHelper()
     {
         Entry = e, Path = e.FullName.Split(PathSeparators)
     }), new string[0]));
 }
Example #2
0
        public IEnumerable <IWebElement> FindElements(string cssSelector)
        {
            By by = By.CssSelector(cssSelector);

            System.Collections.ObjectModel.ReadOnlyCollection <IWebElement> elements = WebDriver.FindElements(by);
            return(elements.Select(x => new CustomWebElement(x, WebDriver)));
        }
Example #3
0
        public static ServerModeOrderDescriptor[] GetSortExpression(
            System.Collections.ObjectModel.ReadOnlyCollection <GridViewColumnState> columns,
            System.Collections.ObjectModel.ReadOnlyCollection <GridViewColumnState> defaultSort)
        {
            ServerModeOrderDescriptor[] orderDescriptors = null;

            if (columns.Any() && defaultSort.Any())
            {
                var joind = columns.ToList();
                joind.AddRange(defaultSort);
                orderDescriptors =
                    joind.Select(
                        c =>
                        new ServerModeOrderDescriptor(new OperandProperty(c.FieldName),
                                                      c.SortOrder == ColumnSortOrder.Descending)).ToArray();
            }
            else if (columns.Any())
            {
                orderDescriptors =
                    columns.Select(
                        c =>
                        new ServerModeOrderDescriptor(new OperandProperty(c.FieldName),
                                                      c.SortOrder == ColumnSortOrder.Descending)).ToArray();
            }
            else if (defaultSort.Any())
            {
                orderDescriptors =
                    defaultSort.Select(
                        c =>
                        new ServerModeOrderDescriptor(new OperandProperty(c.FieldName),
                                                      c.SortOrder == ColumnSortOrder.Descending)).ToArray();
            }
            return(orderDescriptors);
        }
Example #4
0
 internal void FinalizeAllowedChildTypes(Dictionary <string, ContentType> contentTypes)
 {
     if (AllowedChildTypeNames == null)
     {
         AllowedChildTypeNames = EmptyAllowedChildTypeNames;
         AllowedChildTypes     = EmptyAllowedChildTypes;
         return;
     }
     AllowedChildTypeNames = new System.Collections.ObjectModel.ReadOnlyCollection <string>(AllowedChildTypeNames.Where(x => contentTypes.ContainsKey(x)).ToList());
     AllowedChildTypes     = new System.Collections.ObjectModel.ReadOnlyCollection <ContentType>(AllowedChildTypeNames.Select(y => contentTypes[y]).ToList());
 }
Example #5
0
 internal void FinalizeAllowedChildTypes(Dictionary<string, ContentType> contentTypes)
 {
     if (AllowedChildTypeNames == null)
     {
         AllowedChildTypeNames = EmptyAllowedChildTypeNames;
         AllowedChildTypes = EmptyAllowedChildTypes;
         return;
     }
     AllowedChildTypeNames = new System.Collections.ObjectModel.ReadOnlyCollection<string>(AllowedChildTypeNames.Where(x => contentTypes.ContainsKey(x)).ToList());
     AllowedChildTypes = new System.Collections.ObjectModel.ReadOnlyCollection<ContentType>(AllowedChildTypeNames.Select(y => contentTypes[y]).ToList());
 }
Example #6
0
 IEnumerable <T> Process <T>(System.Collections.ObjectModel.ReadOnlyCollection <T> collection)
     where T : Expression
 {
     return(collection.Select(Process));
 }