Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / Model / AttachedPropertiesService.cs / 1305376 / AttachedPropertiesService.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Presentation.Model { using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime; public class AttachedPropertiesService { Listproperties; public AttachedPropertiesService() { this.properties = new List (); } public void AddProperty(AttachedProperty property) { if (property == null) { throw FxTrace.Exception.AsError(new ArgumentNullException("property")); } if (string.IsNullOrEmpty(property.Name)) { throw FxTrace.Exception.AsError(new ArgumentException(SR.AttachedPropertyNameShouldNotBeEmpty)); } this.properties.Add(property); } internal IEnumerable GetAttachedProperties(Type modelItemType) { var properties = from property in this.properties where property.OwnerType.IsAssignableFrom(modelItemType) select property; if (modelItemType.IsGenericType) { var propertiesFromGenericRoot = from property in this.properties where property.OwnerType.IsAssignableFrom(modelItemType.GetGenericTypeDefinition()) select property; properties = properties.Concat(propertiesFromGenericRoot).Distinct(); } return properties; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Pair.cs
- ExpressionVisitor.cs
- DynamicValueConverter.cs
- X509ThumbprintKeyIdentifierClause.cs
- XmlChildNodes.cs
- PathGeometry.cs
- DbConnectionStringBuilder.cs
- ProfileServiceManager.cs
- StorageAssociationSetMapping.cs
- DataServiceClientException.cs
- GridViewSelectEventArgs.cs
- EntryPointNotFoundException.cs
- ConfigXmlText.cs
- DockPanel.cs
- DataGridViewCellEventArgs.cs
- EventLogSession.cs
- PackagePartCollection.cs
- IndexOutOfRangeException.cs
- TcpTransportElement.cs
- PostBackOptions.cs
- MenuAutoFormat.cs
- Codec.cs
- JoinTreeNode.cs
- PropertyValueChangedEvent.cs
- ObjectDataSourceFilteringEventArgs.cs
- XamlBrushSerializer.cs
- XmlNodeChangedEventManager.cs
- SystemIcons.cs
- ArraySet.cs
- HttpRuntimeSection.cs
- DependencyPropertyConverter.cs
- HostedElements.cs
- cookiecollection.cs
- EUCJPEncoding.cs
- HtmlControlDesigner.cs
- LayoutEvent.cs
- GridLength.cs
- TransactionManager.cs
- WebPartHelpVerb.cs
- SafeProcessHandle.cs
- AuthenticationModulesSection.cs
- InfocardClientCredentials.cs
- UnaryExpression.cs
- SimpleHandlerFactory.cs
- UserControlAutomationPeer.cs
- ToolBarOverflowPanel.cs
- XslCompiledTransform.cs
- EventProviderClassic.cs
- Matrix.cs
- cache.cs
- SerializableAttribute.cs
- BuildProvidersCompiler.cs
- CurrentChangingEventArgs.cs
- UnlockCardRequest.cs
- PassportAuthentication.cs
- ColumnMap.cs
- XamlBrushSerializer.cs
- DesignerRegion.cs
- RtfToXamlReader.cs
- DependencyStoreSurrogate.cs
- InputLangChangeRequestEvent.cs
- IdleTimeoutMonitor.cs
- FormViewUpdatedEventArgs.cs
- AllMembershipCondition.cs
- OracleBoolean.cs
- FacetDescriptionElement.cs
- InstanceKeyView.cs
- MarginsConverter.cs
- InternalConfigEventArgs.cs
- QuadraticBezierSegment.cs
- WebUtil.cs
- CheckBox.cs
- CollectionType.cs
- CollectionBase.cs
- LowerCaseStringConverter.cs
- SQLInt64.cs
- Queue.cs
- TimelineCollection.cs
- Crypto.cs
- FamilyMap.cs
- InvokeGenerator.cs
- TableLayoutPanel.cs
- sqlser.cs
- XamlReaderHelper.cs
- PageFunction.cs
- SignatureDescription.cs
- ClientClassGenerator.cs
- SmiRequestExecutor.cs
- BitmapMetadataBlob.cs
- XPathNavigatorReader.cs
- DateTimeFormatInfo.cs
- StartFileNameEditor.cs
- GridViewHeaderRowPresenter.cs
- UpDownBaseDesigner.cs
- XsltInput.cs
- StructuredProperty.cs
- DynamicMetaObjectBinder.cs
- TcpChannelListener.cs
- LineBreak.cs
- ClientSideQueueItem.cs