148 references to OfType
System.Activities (3)
System\Activities\Hosting\WorkflowInstanceExtensionCollection.cs (1)
355foreach (T extension in this.allSingletonExtensions.OfType<T>())
System\Activities\Hosting\WorkflowInstanceExtensionManager.cs (1)
244foreach (IWorkflowInstanceExtension additionalExtensionProvider in this.SingletonExtensions.OfType<IWorkflowInstanceExtension>())
System\Activities\Statements\NoPersistScope.cs (1)
162Persist firstPersist = descendantActivities.OfType<Persist>().FirstOrDefault();
System.Activities.Presentation (31)
System.Activities.Presentation\System\Activities\Presentation\DefaultCommandExtensionCallback.cs (1)
113return cmd.InputGestures.OfType<KeyGesture>().Any(p => string.Equals(p.DisplayString, gesture.DisplayString));
System.Activities.Presentation\System\Activities\Presentation\DesignObjectWrapper.cs (1)
182return new AttributeCollection(this.GetType().GetCustomAttributes(false).OfType<Attribute>().ToArray());
System.Activities.Presentation\System\Activities\Presentation\Metadata\ActivityArgumentHelper.cs (1)
87List<ExpressionReplacement> expressionReplacements = ComputeExpressionReplacements(args.Errors.Select(error => error.Source).OfType<ActivityWithResult>(), args.Context, argumentAccessorWrapperCache);
System.Activities.Presentation\System\Activities\Presentation\View\ActivityTypeDesigner.xaml.cs (1)
39var toHide = menu.Items.OfType<MenuItem>().Where(p =>
System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (6)
803PropertyAttributes = TypeDescriptor.GetAttributes(typeof(VBIdentifierName)).OfType<Attribute>().ToArray(), 815PropertyAttributes = TypeDescriptor.GetAttributes(typeof(Type)).OfType<Attribute>().ToArray(), 827PropertyAttributes = TypeDescriptor.GetAttributes(typeof(PropertyKind)).OfType<Attribute>().Union( new Attribute[] { new EditorAttribute(typeof(DirectionPropertyEditor), typeof(PropertyValueEditor)) }).ToArray(), 839PropertyAttributes = TypeDescriptor.GetAttributes(typeof(Activity)).OfType<Attribute>().Union(new Attribute[] { new EditorAttribute(typeof(DesignObjectWrapperDynamicPropertyEditor), typeof(PropertyValueEditor)), new EditorReuseAttribute(false) }).ToArray(), 866PropertyAttributes = TypeDescriptor.GetAttributes(typeof(bool)).OfType<Attribute>().Union( 1256.OfType<EditorAttribute>()
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (3)
794.OfType<DataGridTemplateColumn>() 1512var entry = values.OfType<DesignObjectWrapper>().FirstOrDefault(); 1513var row = values.OfType<DataGridRow>().FirstOrDefault();
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (8)
324foreach (MenuItem menuItem in this.ContextMenu.Items.OfType<MenuItem>()) 369foreach (MenuItem subItem in menuItem.Items.OfType<MenuItem>()) 453foreach (var entry in this.ContextMenu.Items.OfType<Control>().Reverse()) 465var items = this.contextMenuTarget.ContextMenu.Items.OfType<Control>().Reverse(); 495var items = contextMenuToUnload.Items.OfType<Control>() 527foreach (var item in menuSource.ContextMenu.Items.OfType<MenuItem>()) 535foreach (var item in menuSource.ContextMenu.Items.OfType<MenuItem>()) 587.OfType<MenuItem>()
System.Activities.Presentation\System\Activities\Presentation\View\VariableDesigner.xaml.cs (6)
1012PropertyAttributes = TypeDescriptor.GetAttributes(typeof(VBIdentifierName)).OfType<Attribute>().ToArray(), 1024PropertyAttributes = TypeDescriptor.GetAttributes(typeof(Type)).OfType<Attribute>().ToArray(), 1036PropertyAttributes = TypeDescriptor.GetAttributes(typeof(ModelItem)).OfType<Attribute>().Union(new Attribute[] { new EditorAttribute(typeof(ScopeValueEditor), typeof(PropertyValueEditor)) }).ToArray(), 1048PropertyAttributes = TypeDescriptor.GetAttributes(typeof(Activity)).OfType<Attribute>().Union(new Attribute[] { new EditorAttribute(typeof(DesignObjectWrapperDynamicPropertyEditor), typeof(DialogPropertyValueEditor)), new EditorReuseAttribute(false) }).ToArray(), 1081PropertyAttributes = TypeDescriptor.GetAttributes(typeof(VariableModifiers)).OfType<Attribute>().ToArray(), 1346.OfType<EditorAttribute>()
System.Activities.Presentation\System\Activities\Presentation\View\VisualBasicEditor.xaml.cs (4)
1342.OfType<DescriptionAttribute>() 2061FontFamily fontFamily = values.OfType<FontFamily>().FirstOrDefault(); 2062int lines = values.OfType<int>().FirstOrDefault(); 2063double[] doubleArray = values.OfType<double>().ToArray<double>();
System.ComponentModel.DataAnnotations (6)
DataAnnotations\AssociatedMetadataTypeTypeDescriptor.cs (1)
74Attribute[] newAttributes = TypeDescriptor.GetAttributes(AssociatedMetadataType).OfType<Attribute>().ToArray();
DataAnnotations\CompareAttribute.cs (2)
62DisplayAttribute display = attributes.OfType<DisplayAttribute>().FirstOrDefault(); 66DisplayNameAttribute displayName = attributes.OfType<DisplayNameAttribute>().FirstOrDefault();
DataAnnotations\MetadataPropertyDescriptorWrapper.cs (1)
15var readOnlyAttribute = newAttributes.OfType<ReadOnlyAttribute>().FirstOrDefault();
DataAnnotations\ValidationAttributeStore.cs (2)
149this._validationAttributes = attributes.OfType<ValidationAttribute>(); 150this.DisplayAttribute = attributes.OfType<DisplayAttribute>().SingleOrDefault();
System.Data (20)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\DesignObjectWrapper.cs (1)
182return new AttributeCollection(this.GetType().GetCustomAttributes(false).OfType<Attribute>().ToArray());
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Metadata\ActivityArgumentHelper.cs (1)
87List<ExpressionReplacement> expressionReplacements = ComputeExpressionReplacements(args.Errors.Select(error => error.Source).OfType<ActivityWithResult>(), args.Context, argumentAccessorWrapperCache);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (6)
803PropertyAttributes = TypeDescriptor.GetAttributes(typeof(VBIdentifierName)).OfType<Attribute>().ToArray(), 815PropertyAttributes = TypeDescriptor.GetAttributes(typeof(Type)).OfType<Attribute>().ToArray(), 827PropertyAttributes = TypeDescriptor.GetAttributes(typeof(PropertyKind)).OfType<Attribute>().Union( new Attribute[] { new EditorAttribute(typeof(DirectionPropertyEditor), typeof(PropertyValueEditor)) }).ToArray(), 839PropertyAttributes = TypeDescriptor.GetAttributes(typeof(Activity)).OfType<Attribute>().Union(new Attribute[] { new EditorAttribute(typeof(DesignObjectWrapperDynamicPropertyEditor), typeof(PropertyValueEditor)), new EditorReuseAttribute(false) }).ToArray(), 866PropertyAttributes = TypeDescriptor.GetAttributes(typeof(bool)).OfType<Attribute>().Union( 1256.OfType<EditorAttribute>()
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (2)
1512var entry = values.OfType<DesignObjectWrapper>().FirstOrDefault(); 1513var row = values.OfType<DataGridRow>().FirstOrDefault();
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\VariableDesigner.xaml.cs (6)
1012PropertyAttributes = TypeDescriptor.GetAttributes(typeof(VBIdentifierName)).OfType<Attribute>().ToArray(), 1024PropertyAttributes = TypeDescriptor.GetAttributes(typeof(Type)).OfType<Attribute>().ToArray(), 1036PropertyAttributes = TypeDescriptor.GetAttributes(typeof(ModelItem)).OfType<Attribute>().Union(new Attribute[] { new EditorAttribute(typeof(ScopeValueEditor), typeof(PropertyValueEditor)) }).ToArray(), 1048PropertyAttributes = TypeDescriptor.GetAttributes(typeof(Activity)).OfType<Attribute>().Union(new Attribute[] { new EditorAttribute(typeof(DesignObjectWrapperDynamicPropertyEditor), typeof(DialogPropertyValueEditor)), new EditorReuseAttribute(false) }).ToArray(), 1081PropertyAttributes = TypeDescriptor.GetAttributes(typeof(VariableModifiers)).OfType<Attribute>().ToArray(), 1346.OfType<EditorAttribute>()
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\VisualBasicEditor.xaml.cs (4)
1342.OfType<DescriptionAttribute>() 2061FontFamily fontFamily = values.OfType<FontFamily>().FirstOrDefault(); 2062int lines = values.OfType<int>().FirstOrDefault(); 2063double[] doubleArray = values.OfType<double>().ToArray<double>();
System.Data.Entity (23)
System\Data\Common\CommandTrees\Internal\ViewSimplifier.cs (1)
422predicates.OfType<DbPropertyExpression>()
System\Data\Mapping\FunctionImportMapping.cs (1)
67IEnumerable<FunctionImportEntityTypeMapping> entityTypeMappings = structuralTypeMappings.OfType<FunctionImportEntityTypeMapping>();
System\Data\Mapping\StorageEndPropertyMapping.cs (1)
105return m_properties.OfType<StorageScalarPropertyMapping>().Select((propertyMap => propertyMap.ColumnProperty)).Cast<EdmMember>();
System\Data\Mapping\StorageMappingItemCollection.cs (1)
526.OfType<StorageEndPropertyMapping>()
System\Data\Mapping\StorageMappingItemLoader.cs (1)
1982IEnumerable<StructuralType> currentTypesInHierachy = isOfTypeEntityTypes.Concat(entityTypes).Distinct().OfType<StructuralType>();
System\Data\Mapping\Update\Internal\UpdateCommandOrderer.cs (2)
194foreach (DynamicUpdateCommand command in this.Vertices.OfType<DynamicUpdateCommand>()) 277foreach (DynamicUpdateCommand command in this.Vertices.OfType<DynamicUpdateCommand>())
System\Data\Mapping\Update\Internal\ViewLoader.cs (3)
346.OfType<StorageScalarPropertyMapping>()) 361.OfType<StorageConditionPropertyMapping>()) 377.OfType<StorageScalarPropertyMapping>())
System\Data\Mapping\ViewGeneration\Structures\LeafCellTreeNode.cs (1)
270IEnumerable<StorageEndPropertyMapping> otherEnds = mapFragment.Properties.OfType<StorageEndPropertyMapping>().Where(eMap => (!eMap.Equals(endMap)));
System\Data\Mapping\ViewGeneration\Validation\ForeignConstraint.cs (1)
375var foreignKeyAssociations = childContext.EntityContainerMapping.EdmEntityContainer.BaseEntitySets.OfType<AssociationSet>().Where(it => it.ElementType.IsForeignKey).Select(it => it.ElementType);
System\Data\Mapping\ViewGeneration\ViewgenContext.cs (2)
135var entityTypes = m_cellWrappers.Select(it => it.RightExtent).OfType<EntitySet>().Select(it => it.ElementType); 137var allForeignKeyAssociationSets = this.m_entityContainerMapping.EdmEntityContainer.BaseEntitySets.OfType<AssociationSet>().Where(it => it.ElementType.IsForeignKey);
System\Data\Mapping\ViewValidator.cs (2)
175foreach (ComplexType complexType in properties.Select(p => p.TypeUsage.EdmType).OfType<ComplexType>()) 193return MetadataHelper.GetTypeAndSubtypesOf(_elementType, this.EdmItemCollection, true).OfType<EntityType>();
System\Data\Metadata\Converter.cs (1)
138foreach (Som.SchemaEntityType element in somSchema.SchemaTypes.OfType<Som.SchemaEntityType>())
System\Data\Metadata\ObjectLayer\ObjectItemLoadingSessionData.cs (1)
149foreach (EdmType type in entry.CacheEntry.TypesInAssembly.OfType<EdmType>())
System\Data\Query\PlanCompiler\JoinGraph.cs (1)
1133foreach (AugmentedJoinNode augmentedJoinNode in m_vertexes.OfType<AugmentedJoinNode>().Where(j => j.Node.Op.OpType == OpType.LeftOuterJoin && j.JoinEdges.Count > 0))
System\Data\Query\PlanCompiler\NominalTypeEliminator.cs (1)
193foreach (var paramVar in m_command.Vars.OfType<ParameterVar>().Where(v => md.TypeSemantics.IsEnumerationType(v.Type) || md.TypeSemantics.IsStrongSpatialType(v.Type)).ToArray())
System\Data\SqlClient\SqlProviderUtilities.cs (3)
52var entitySets = container.BaseEntitySets.OfType<EntitySet>().OrderBy(s => s.Name); 67foreach (EntitySet entitySet in container.BaseEntitySets.OfType<EntitySet>().OrderBy(s => s.Name)) 72foreach (AssociationSet associationSet in container.BaseEntitySets.OfType<AssociationSet>().OrderBy(s => s.Name))
System.Data.Entity.Design (2)
System\Data\Entity\Design\EntityCodeGenerator.cs (2)
354errors.AddRange(codeGenerator.Errors.OfType<CompilerError>().Select(c => ConvertToEdmSchemaError(c, errorCode))); 582string message = results.Errors.OfType<CompilerError>().Aggregate(string.Empty, (accumulated, input) => accumulated == string.Empty ? input.ToString() : accumulated + Environment.NewLine + input.ToString());
System.Data.Linq (3)
DataServices.cs (1)
597target = ((IEnumerable)this.context.Provider.Execute(this.GetObjectQuery(type, keyValues)).ReturnValue).OfType<object>().SingleOrDefault();
SqlClient\Query\QueryConverter.cs (1)
1788List<SqlExpression> list = values.OfType<object>().Select(v => sql.ValueFromObject(v, elemType, true, this.dominatingExpression)).ToList();
SqlClient\SqlProvider.cs (1)
431DbProviderFactories.GetFactoryClasses().Rows.OfType<DataRow>()
System.Data.Services (4)
System\Data\Services\Providers\ObjectContextServiceProvider.cs (3)
127foreach (AssociationSet associationSet in sourceEntitySet.EntityContainer.BaseEntitySets.OfType<AssociationSet>()) 1064foreach (EntitySet entitySet in container.BaseEntitySets.OfType<EntitySet>()) 1094foreach (AssociationSet associationSet in container.BaseEntitySets.OfType<AssociationSet>())
System\Data\Services\Providers\ReflectionServiceProvider.cs (1)
203DataServiceKeyAttribute keyAttribute = property.ReflectedType.GetCustomAttributes(true).OfType<DataServiceKeyAttribute>().FirstOrDefault();
System.Data.Services.Client (7)
System\Data\Services\Client\ALinq\ResourceSetExpression.cs (4)
163return this.sequenceQueryOptions.OfType<FilterQueryOptionExpression>().SingleOrDefault(); 172get { return this.sequenceQueryOptions.OfType<OrderByQueryOptionExpression>().SingleOrDefault(); } 180get { return this.sequenceQueryOptions.OfType<SkipQueryOptionExpression>().SingleOrDefault(); } 188get { return this.sequenceQueryOptions.OfType<TakeQueryOptionExpression>().SingleOrDefault(); }
System\Data\Services\Client\ClientType.cs (2)
112bool isEntity = type.GetCustomAttributes(true).OfType<DataServiceEntityAttribute>().Any(); 113DataServiceKeyAttribute dska = type.GetCustomAttributes(true).OfType<DataServiceKeyAttribute>().FirstOrDefault();
System\Data\Services\Client\DataServiceContext.cs (1)
2216var codegenAttr = this.resolveName.Method.GetCustomAttributes(false).OfType<System.CodeDom.Compiler.GeneratedCodeAttribute>().FirstOrDefault();
System.Data.Services.Design (1)
System\Data\EntityModel\Emitters\NamespaceEmitter.cs (1)
258.OfType<EdmType>()
System.ServiceModel (1)
System\ServiceModel\Configuration\SecurityElementBase.cs (1)
840if (this.IsSecurityElementBootstrap && !this.ElementInformation.Properties.OfType<PropertyInformation>().Any(nontrivialProperty))
System.ServiceModel.Web (1)
System\ServiceModel\Dispatcher\HelpExampleGenerator.cs (1)
743foreach (XmlSchemaElement derivedElement in context.schemaSet.GlobalElements.Values.OfType<XmlSchemaElement>().Where(e =>
System.Web (19)
Compilation\BuildManager.cs (1)
1361return s_dynamicallyAddedReferencedAssembly.OfType<Assembly>();
ModelBinding\AssociatedMetadataProvider.cs (1)
14foreach (IMetadataAware awareAttribute in attributes.OfType<IMetadataAware>()) {
ModelBinding\AssociatedValidatorProvider.cs (1)
42return GetValidators(metadata, context, property.Attributes.OfType<Attribute>());
ModelBinding\DataAnnotationsModelMetadataProvider.cs (10)
13DisplayColumnAttribute displayColumnAttribute = attributeList.OfType<DisplayColumnAttribute>().FirstOrDefault(); 26IEnumerable<UIHintAttribute> uiHintAttributes = attributeList.OfType<UIHintAttribute>(); 33DataTypeAttribute dataTypeAttribute = attributeList.OfType<DataTypeAttribute>().FirstOrDefault(); 38EditableAttribute editable = attributes.OfType<EditableAttribute>().FirstOrDefault(); 43ReadOnlyAttribute readOnlyAttribute = attributeList.OfType<ReadOnlyAttribute>().FirstOrDefault(); 49DisplayFormatAttribute displayFormatAttribute = attributeList.OfType<DisplayFormatAttribute>().FirstOrDefault(); 67ScaffoldColumnAttribute scaffoldColumnAttribute = attributeList.OfType<ScaffoldColumnAttribute>().FirstOrDefault(); 72DisplayAttribute display = attributes.OfType<DisplayAttribute>().FirstOrDefault(); 88DisplayNameAttribute displayNameAttribute = attributeList.OfType<DisplayNameAttribute>().FirstOrDefault(); 94RequiredAttribute requiredAttribute = attributeList.OfType<RequiredAttribute>().FirstOrDefault();
ModelBinding\DataAnnotationsModelValidatorProvider.cs (1)
94foreach (ValidationAttribute attribute in attributes.OfType<ValidationAttribute>()) {
ModelBinding\ModelBinderProviderCollection.cs (2)
104.OfType<ModelBinderProviderOptionsAttribute>() 111ExtensibleModelBinderAttribute attr = TypeDescriptorHelper.Get(modelType).GetAttributes().OfType<ExtensibleModelBinderAttribute>().FirstOrDefault();
ModelBinding\MutableObjectModelBinder.cs (3)
126DefaultValueAttribute attr = propertyDescriptor.Attributes.OfType<DefaultValueAttribute>().FirstOrDefault(); 137BindingBehaviorAttribute typeAttr = modelDescriptor.GetAttributes().OfType<BindingBehaviorAttribute>().SingleOrDefault(); 140BindingBehaviorAttribute propAttr = propertyDescriptor.Attributes.OfType<BindingBehaviorAttribute>().SingleOrDefault();
System.Web.DynamicData (20)
DynamicData\DataBoundControlParameterTarget.cs (1)
32DataKeyPropertyAttribute attribute = _control.GetType().GetCustomAttributes(true).OfType<DataKeyPropertyAttribute>().FirstOrDefault();
DynamicData\DynamicValidator.cs (1)
151foreach (var attrib in Column.Attributes.Cast<Attribute>().OfType<ValidationAttribute>()) {
DynamicData\FieldTemplateUserControl.cs (2)
493var rangeAttribute = column.Attributes.OfType<RangeAttribute>().FirstOrDefault(); 526var regexAttribute = column.Attributes.OfType<RegularExpressionAttribute>().FirstOrDefault();
DynamicData\MetaColumn.cs (1)
652var uiHints = Attributes.OfType<T>();
DynamicData\MetaModel.cs (3)
237var tableNameAttribute = tableProvider.Attributes.OfType<TableNameAttribute>().SingleOrDefault(); 653return Tables.OfType<IMetaTable>().ToList().AsReadOnly(); 679return VisibleTables.OfType<IMetaTable>().ToList();
DynamicData\MetaTable.cs (5)
137var fkColumnNamesArray = Columns.OfType<MetaForeignKeyColumn>().Select(column => column.Name).ToArray(); 1032return Columns.OfType<IMetaColumn>().ToList().AsReadOnly(); 1053return GetFilteredColumns().OfType<IMetaColumn>(); 1059return GetScaffoldColumns(mode, containerType).OfType<IMetaColumn>(); 1064return PrimaryKeyColumns.OfType<IMetaColumn>().ToList().AsReadOnly();
DynamicData\ModelProviders\EFColumnProvider.cs (1)
44var navigationProperties = property.DeclaringType.Members.OfType<NavigationProperty>();
DynamicData\ModelProviders\EFDataModelProvider.cs (1)
37IDictionary<EntityType, EntitySet> entitySetLookup = container.BaseEntitySets.OfType<EntitySet>().ToDictionary(e => e.ElementType);
DynamicData\ModelProviders\SimpleColumnProvider.cs (1)
18IsPrimaryKey = propertyDescriptor.Attributes.OfType<KeyAttribute>().Any();
DynamicData\ModelProviders\SimpleTableProvider.cs (2)
54_columns = columnDescriptors.OfType<PropertyDescriptor>().Select(p => new SimpleColumnProvider(this, p)).OfType<ColumnProvider>().ToList();
DynamicData\Util\AttributeExtensions.cs (1)
14return attributes.OfType<TAttribute>().FirstOrDefault();
DynamicData\Util\Misc.cs (1)
146var enumEntries = from e in Enum.GetValues(enumType).OfType<object>()
System.Web.Entity (3)
System\Data\WebControls\EntityDataSourceUtil.cs (3)
444IEnumerable<T_EdmType> typesInWorkSpace = itemCollection.OfType<T_EdmType>(); 756foreach (AssociationSet associationSet in entitySet.EntityContainer.BaseEntitySets.OfType<AssociationSet>()) 1055foreach (var keyProperty in entityWrapper.Collection.AllPropertyDescriptors.Select(d => d.Column).OfType<EntityDataSourcePropertyColumn>().Where(c => c.IsKey))
System.Web.Entity.Design (1)
System\Data\WebControls\Design\EntityDataSourceDesignerHelper.cs (1)
1436IEnumerable<EntityType> entityTypesInCollection = itemCollection.OfType<EntityType>();
System.Web.Extensions (3)
UI\ScriptManager.cs (2)
321referencedAssemblies = BuildManager.GetReferencedAssemblies().OfType<Assembly>(); 325referencedAssemblies = compilationSection.Assemblies.OfType<AssemblyInfo>().SelectMany(assemblyInfo => assemblyInfo.AssemblyInternal);
UI\WebControls\Dynamic.cs (1)
1416OfType<PropertyInfo>().