Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / DataServiceKeyAttribute.cs / 1 / DataServiceKeyAttribute.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// Clr Attribute to be annotated on key properties // // // @owner [....], [....] //--------------------------------------------------------------------- namespace System.Data.Services.Common { using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Data.Services.Client; using System.Linq; ////// Attribute to be annotated on key properties /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments", Justification = "Accessors are available for processed input.")] [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public sealed class DataServiceKeyAttribute : System.Attribute { ///Name of the properties that form the key. private readonly ReadOnlyCollectionkeyNames; /// /// Initializes a new instance of DataServiceKey attribute with the property name /// that forms the Key. /// /// Name of the property that form the key for the current type. public DataServiceKeyAttribute(string keyName) { Util.CheckArgumentNull(keyName, "keyName"); Util.CheckArgumentNotEmpty(keyName, "KeyName"); this.keyNames = new ReadOnlyCollection(new string[1] { keyName }); } /// /// Initializes a new instance of DataServiceKey attribute with the list of property names /// that form the key. /// /// Name of the properties that form the key for the current type. public DataServiceKeyAttribute(params string[] keyNames) { Util.CheckArgumentNull(keyNames, "keyNames"); if (keyNames.Length == 0 || keyNames.Any(f => f == null || f.Length == 0)) { throw Error.Argument(Strings.DSKAttribute_MustSpecifyAtleastOnePropertyName, "keyNames"); } this.keyNames = new ReadOnlyCollection(keyNames); } /// Name of the properties that form the key for the current type. public ReadOnlyCollectionKeyNames { get { return this.keyNames; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // //// Clr Attribute to be annotated on key properties // // // @owner [....], [....] //--------------------------------------------------------------------- namespace System.Data.Services.Common { using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Data.Services.Client; using System.Linq; ////// Attribute to be annotated on key properties /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments", Justification = "Accessors are available for processed input.")] [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public sealed class DataServiceKeyAttribute : System.Attribute { ///Name of the properties that form the key. private readonly ReadOnlyCollectionkeyNames; /// /// Initializes a new instance of DataServiceKey attribute with the property name /// that forms the Key. /// /// Name of the property that form the key for the current type. public DataServiceKeyAttribute(string keyName) { Util.CheckArgumentNull(keyName, "keyName"); Util.CheckArgumentNotEmpty(keyName, "KeyName"); this.keyNames = new ReadOnlyCollection(new string[1] { keyName }); } /// /// Initializes a new instance of DataServiceKey attribute with the list of property names /// that form the key. /// /// Name of the properties that form the key for the current type. public DataServiceKeyAttribute(params string[] keyNames) { Util.CheckArgumentNull(keyNames, "keyNames"); if (keyNames.Length == 0 || keyNames.Any(f => f == null || f.Length == 0)) { throw Error.Argument(Strings.DSKAttribute_MustSpecifyAtleastOnePropertyName, "keyNames"); } this.keyNames = new ReadOnlyCollection(keyNames); } /// Name of the properties that form the key for the current type. public ReadOnlyCollectionKeyNames { get { return this.keyNames; } } } } // 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
- InfoCardRequestException.cs
- LogExtentCollection.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- BoundField.cs
- EndpointFilterProvider.cs
- RemotingConfiguration.cs
- Primitive.cs
- SrgsElementFactoryCompiler.cs
- ObjectNotFoundException.cs
- SqlRowUpdatedEvent.cs
- RelationshipDetailsRow.cs
- HtmlTitle.cs
- ResourceContainer.cs
- UInt32Storage.cs
- HttpCapabilitiesBase.cs
- StandardToolWindows.cs
- WSSecurityTokenSerializer.cs
- ApplicationId.cs
- InvalidFilterCriteriaException.cs
- PointUtil.cs
- Environment.cs
- XmlSchemaAnnotation.cs
- VectorAnimationBase.cs
- TextBoxAutoCompleteSourceConverter.cs
- ReadOnlyHierarchicalDataSourceView.cs
- GridViewRowPresenterBase.cs
- ClientSideProviderDescription.cs
- HtmlInputCheckBox.cs
- OverrideMode.cs
- EditorPartCollection.cs
- XmlChildEnumerator.cs
- RIPEMD160.cs
- ChtmlTextBoxAdapter.cs
- X509WindowsSecurityToken.cs
- RuntimeHelpers.cs
- DataControlFieldCollection.cs
- BindingElementCollection.cs
- AudioLevelUpdatedEventArgs.cs
- Rect3DConverter.cs
- OdbcCommandBuilder.cs
- FormsAuthenticationEventArgs.cs
- PagerSettings.cs
- AppDomain.cs
- X509ClientCertificateAuthentication.cs
- ItemsChangedEventArgs.cs
- validationstate.cs
- DurableInstance.cs
- InfoCardX509Validator.cs
- OrderedParallelQuery.cs
- ImageFormat.cs
- FullTextBreakpoint.cs
- DbParameterCollectionHelper.cs
- RadioButton.cs
- HttpSocketManager.cs
- TableLayoutPanelDesigner.cs
- PKCS1MaskGenerationMethod.cs
- FormViewDeleteEventArgs.cs
- ImageBrush.cs
- IdentityNotMappedException.cs
- GeometryGroup.cs
- QueueProcessor.cs
- ProvideValueServiceProvider.cs
- DataExchangeServiceBinder.cs
- XmlUtil.cs
- InteropTrackingRecord.cs
- DBCommand.cs
- GCHandleCookieTable.cs
- RequestCachePolicyConverter.cs
- TemplatePagerField.cs
- PageAdapter.cs
- InvalidOleVariantTypeException.cs
- BindingList.cs
- TextEffect.cs
- HttpWebResponse.cs
- XmlLinkedNode.cs
- OleServicesContext.cs
- DataStreamFromComStream.cs
- Tuple.cs
- DataSetMappper.cs
- WindowsTokenRoleProvider.cs
- CallbackHandler.cs
- TextPointerBase.cs
- PreservationFileReader.cs
- ObservableDictionary.cs
- LogManagementAsyncResult.cs
- HttpServerUtilityWrapper.cs
- AppLevelCompilationSectionCache.cs
- XPathParser.cs
- Odbc32.cs
- HighlightVisual.cs
- WizardPanel.cs
- RadialGradientBrush.cs
- Misc.cs
- SecurityToken.cs
- UInt64Storage.cs
- TargetParameterCountException.cs
- DataException.cs
- OleDbRowUpdatedEvent.cs
- TimersDescriptionAttribute.cs
- GridViewAutoFormat.cs