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