104 references to FirstOrDefault
System.Activities (1)
System\Activities\Statements\NoPersistScope.cs (1)
162Persist firstPersist = descendantActivities.OfType<Persist>().FirstOrDefault();
System.Activities.Core.Presentation (2)
System\ServiceModel\Activities\Presentation\BindingEditor.xaml.cs (2)
118toSelect = editor.bindingElements.Where(where).Where(p => string.Equals(p.BindingName, bindingName)).FirstOrDefault(); 122toSelect = editor.bindingElements.Where(where).FirstOrDefault();
System.Activities.Presentation (13)
System.Activities.Presentation\System\Activities\Presentation\DeleteHelper.cs (1)
46using (EditingScope es = (EditingScope)toDelete.FirstOrDefault().BeginEdit(SR.DeleteOperationEditingScopeDescription))
System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemExtensions.cs (1)
508.FirstOrDefault();
System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (1)
1263.FirstOrDefault();
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (2)
1512var entry = values.OfType<DesignObjectWrapper>().FirstOrDefault(); 1513var row = values.OfType<DataGridRow>().FirstOrDefault();
System.Activities.Presentation\System\Activities\Presentation\View\ParserContext.cs (1)
100.FirstOrDefault();
System.Activities.Presentation\System\Activities\Presentation\View\TreeView\DesignerTreeAutoExpandHelper.cs (1)
59select child).FirstOrDefault();
System.Activities.Presentation\System\Activities\Presentation\View\VariableDesigner.xaml.cs (3)
972return scope1List.FirstOrDefault(); 975return scope1List.Intersect(scope2List).FirstOrDefault(); 1353.FirstOrDefault();
System.Activities.Presentation\System\Activities\Presentation\View\VisualBasicEditor.xaml.cs (3)
1343.FirstOrDefault(); 2061FontFamily fontFamily = values.OfType<FontFamily>().FirstOrDefault(); 2062int lines = values.OfType<int>().FirstOrDefault();
System.ComponentModel.DataAnnotations (7)
DataAnnotations\AssociatedMetadataTypeTypeDescriptor.cs (1)
148MemberInfo matchingMember = type.GetMember(memberName, allowedMemberTypes, searchFlags).FirstOrDefault();
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\Validator.cs (3)
188ValidationError err = GetValidationErrors(value, validationContext, attributes, false).FirstOrDefault(); 237ValidationError err = GetObjectValidationErrors(instance, validationContext, validateAllProperties, false).FirstOrDefault(); 263ValidationError err = GetValidationErrors(value, validationContext, validationAttributes, false).FirstOrDefault();
System.Core (1)
System\Linq\ParallelEnumerable.cs (1)
5542settings.CancellationState).FirstOrDefault();
System.Data (13)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\DeleteHelper.cs (1)
46using (EditingScope es = (EditingScope)toDelete.FirstOrDefault().BeginEdit(SR.DeleteOperationEditingScopeDescription))
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemExtensions.cs (1)
508.FirstOrDefault();
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (1)
1263.FirstOrDefault();
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\ParserContext.cs (1)
100.FirstOrDefault();
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\TreeView\DesignerTreeAutoExpandHelper.cs (1)
59select child).FirstOrDefault();
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\VariableDesigner.xaml.cs (3)
972return scope1List.FirstOrDefault(); 975return scope1List.Intersect(scope2List).FirstOrDefault(); 1353.FirstOrDefault();
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\VisualBasicEditor.xaml.cs (3)
1343.FirstOrDefault(); 2061FontFamily fontFamily = values.OfType<FontFamily>().FirstOrDefault(); 2062int lines = values.OfType<int>().FirstOrDefault();
System.Data.Entity (12)
System\Data\EntityClient\EntityCommandDefinition.cs (2)
119EntitySet firstResultEntitySet = mapping.FunctionImport.EntitySets.FirstOrDefault(); 123_entitySets.Add(mapping.FunctionImport.EntitySets.FirstOrDefault());
System\Data\Mapping\FunctionImportMapping.cs (1)
70if (null != entityTypeMappings && null != entityTypeMappings.FirstOrDefault<FunctionImportEntityTypeMapping>())
System\Data\Mapping\ViewGeneration\Validation\ForeignConstraint.cs (1)
378ReferentialConstraint refConstraint = association.ReferentialConstraints.FirstOrDefault();
System\Data\Mapping\ViewValidator.cs (1)
343return this.variableScopes.Where(it => (it.Key == expression.VariableName)).Select(it => it.Value).FirstOrDefault();
System\Data\Metadata\Edm\EdmFunction.cs (1)
190return _returnParameters.FirstOrDefault();
System\Data\Objects\DataClasses\RelatedEnd.cs (1)
861ReferentialConstraint constraint = ((AssociationType)RelationMetadata).ReferentialConstraints.FirstOrDefault();
System\Data\Objects\DataClasses\RelationshipManager.cs (1)
430select end).FirstOrDefault();
System\Data\Objects\ELinq\BindingContext.cs (1)
83.FirstOrDefault();
System\Data\Objects\ELinq\MethodCallTranslator.cs (1)
63.Cast<EdmFunctionAttribute>().FirstOrDefault();
System\Data\Objects\ELinq\ObjectQueryProvider.cs (1)
207return (sequence) => { return Enumerable.FirstOrDefault(sequence); };
System\Data\Query\PlanCompiler\TransformationRules.cs (1)
2350inputSentinel = n.Child1.Children.Where(child => child.Child0.Op.OpType == OpType.NullSentinel).Select(child => ((VarDefOp)(child.Op)).Var).FirstOrDefault();
System.Data.Linq (3)
ChangeDirector.cs (2)
90object[] syncResults = (object[])facts.FirstOrDefault(); 143object[] syncResults = (object[])facts.FirstOrDefault();
SqlClient\SqlProvider.cs (1)
615if (this.services.Model.GetTables().FirstOrDefault() == null) {
System.Data.Services (5)
System\Data\Services\Providers\ReflectionServiceProvider.cs (1)
203DataServiceKeyAttribute keyAttribute = property.ReflectedType.GetCustomAttributes(true).OfType<DataServiceKeyAttribute>().FirstOrDefault();
System\Data\Services\Providers\ResourceType.cs (2)
1218if (this.propertiesDeclaredOnThisType.Where(p => p.Name == rp.Name).FirstOrDefault() != null) 1226if (this.propertiesDeclaredOnThisType.Where(p => p.IsOfKind(ResourcePropertyKind.Key)).FirstOrDefault() == null)
System\Data\Services\Serializers\SyndicationDeserializer.cs (2)
128SyndicationCategory category = item.Categories.Where(c => c.Scheme == XmlConstants.DataWebSchemeNamespace).FirstOrDefault(); 225SyndicationElementExtension properties = item.ElementExtensions.Where(p => p.OuterName == XmlConstants.AtomPropertiesElementName && p.OuterNamespace == XmlConstants.DataWebMetadataNamespace).FirstOrDefault();
System.Data.Services.Client (13)
System\Data\Services\Client\ALinq\DataServiceQueryProvider.cs (1)
120return query.AsEnumerable().FirstOrDefault();
System\Data\Services\Client\ALinq\ResourceBinder.cs (1)
1760member = properties.Where(property => property.GetGetMethod() == member).FirstOrDefault();
System\Data\Services\Client\ALinq\ResourceSetExpression.cs (1)
235QueryOptionExpression old = this.sequenceQueryOptions.Where(o => o.GetType() == qoe.GetType()).FirstOrDefault();
System\Data\Services\Client\AtomMaterializer.cs (4)
1393property = values.Where(v => v.Name == step).FirstOrDefault(); 1479var node = element.Nodes().Where(n => n.NodeType == XmlNodeType.Text || n.NodeType == XmlNodeType.SignificantWhitespace).FirstOrDefault(); 1527atomProperty = properties.Where(p => p.Name == propertyName).FirstOrDefault(); 1549atomProperty = properties.Where(p => p.Name == propertyName).FirstOrDefault();
System\Data\Services\Client\AtomMaterializerLog.cs (1)
163LinkDescriptor end = this.context.GetLinks(link.Source, link.SourceProperty).FirstOrDefault();
System\Data\Services\Client\ClientType.cs (2)
113DataServiceKeyAttribute dska = type.GetCustomAttributes(true).OfType<DataServiceKeyAttribute>().FirstOrDefault(); 258select b).FirstOrDefault()
System\Data\Services\Client\DataServiceContext.cs (2)
2216var codegenAttr = this.resolveName.Method.GetCustomAttributes(false).OfType<System.CodeDom.Compiler.GeneratedCodeAttribute>().FirstOrDefault(); 3418LinkDescriptor existing = this.GetLinks(source, sourceProperty).FirstOrDefault();
System\Data\Services\Client\MaterializeFromAtom.cs (1)
510XElement countNode = element.Descendants(XNamespace.Get(XmlConstants.DataWebMetadataNamespace) + XmlConstants.RowCountElement).FirstOrDefault();
System.Data.Services.Design (3)
System\Data\EntityModel\Emitters\ClientApiGenerator.cs (1)
536EntitySetBase baseEntitySet = container.BaseEntitySets.FirstOrDefault();
System\Data\EntityModel\Emitters\EntityContainerEmitter.cs (1)
84bool hasInheritance = (null != q.FirstOrDefault());
System\Data\EntityModel\EntityClassGenerator.cs (1)
468XAttribute version = dataServiceElement.Attributes(metadataNs + XmlConstants.HttpDataServiceVersion).FirstOrDefault();
System.ServiceModel.Web (1)
System\ServiceModel\Dispatcher\HelpExampleGenerator.cs (1)
371XmlSchemaElement contentElement = GetDerivedTypes(element, context).FirstOrDefault();
System.Web (24)
Compilation\AssemblyResolver.cs (4)
423path = result.ResolvedFiles.FirstOrDefault(); 432path = result.ResolvedFiles.FirstOrDefault(); 445path = result.ResolvedFiles.FirstOrDefault(); 479path = result.ResolvedFiles.FirstOrDefault();
ModelBinding\BinaryDataModelBinderProvider.cs (1)
20select binder).FirstOrDefault();
ModelBinding\DataAnnotationsModelMetadataProvider.cs (9)
13DisplayColumnAttribute displayColumnAttribute = attributeList.OfType<DisplayColumnAttribute>().FirstOrDefault(); 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\DataAnnotationsModelValidator.cs (1)
127errorMemberName = result.MemberNames.FirstOrDefault();
ModelBinding\ModelBinderProviderCollection.cs (3)
33select binder).FirstOrDefault(); 105.FirstOrDefault(); 111ExtensibleModelBinderAttribute attr = TypeDescriptorHelper.Get(modelType).GetAttributes().OfType<ExtensibleModelBinderAttribute>().FirstOrDefault();
ModelBinding\ModelMetadata.cs (1)
396ModelMetadata firstProperty = Properties.FirstOrDefault();
ModelBinding\MutableObjectModelBinder.cs (3)
126DefaultValueAttribute attr = propertyDescriptor.Attributes.OfType<DefaultValueAttribute>().FirstOrDefault(); 164string missingPropertyName = missingRequiredProperties.FirstOrDefault(); 198ModelValidator requiredValidator = ModelValidatorProviders.Providers.GetValidators(propertyMetadata, modelBindingExecutionContext).Where(v => v.IsRequired).FirstOrDefault();
ModelBinding\ValueProviderCollection.cs (1)
28select result).FirstOrDefault();
UI\ControlBuilder.cs (1)
145select (string)simplePropertyEntry.Value).FirstOrDefault();
System.Web.DynamicData (5)
DynamicData\DataBoundControlParameterTarget.cs (1)
32DataKeyPropertyAttribute attribute = _control.GetType().GetCustomAttributes(true).OfType<DataKeyPropertyAttribute>().FirstOrDefault();
DynamicData\FieldTemplateUserControl.cs (2)
493var rangeAttribute = column.Attributes.OfType<RangeAttribute>().FirstOrDefault(); 526var regexAttribute = column.Attributes.OfType<RegularExpressionAttribute>().FirstOrDefault();
DynamicData\MetaColumn.cs (1)
658presentationLayerNotSpecified.FirstOrDefault();
DynamicData\Util\AttributeExtensions.cs (1)
14return attributes.OfType<TAttribute>().FirstOrDefault();
System.Xml.Linq (1)
System\Xml\Linq\XNodeNavigator.cs (1)
882return node.XPathSelectElements(expression, resolver).FirstOrDefault();