Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ADRoleFactory.cs
- ImmComposition.cs
- __Error.cs
- ArraySegment.cs
- _NtlmClient.cs
- RSAPKCS1SignatureFormatter.cs
- DiscoveryInnerClientManaged11.cs
- Identity.cs
- ButtonFlatAdapter.cs
- CodeTypeReference.cs
- WindowsSpinner.cs
- ComUdtElement.cs
- XmlDeclaration.cs
- SqlDataSourceSummaryPanel.cs
- DecimalStorage.cs
- XmlWrappingReader.cs
- CacheModeConverter.cs
- GlobalProxySelection.cs
- EmbeddedMailObject.cs
- DialogResultConverter.cs
- ActivityUtilities.cs
- ActiveXMessageFormatter.cs
- HWStack.cs
- VectorKeyFrameCollection.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- JsonObjectDataContract.cs
- ExpressionBuilder.cs
- DefaultBindingPropertyAttribute.cs
- MailHeaderInfo.cs
- ForEachAction.cs
- SelectionList.cs
- SpeakInfo.cs
- SrgsRule.cs
- EntityClientCacheKey.cs
- SystemNetHelpers.cs
- DataColumnChangeEvent.cs
- MediaTimeline.cs
- AttributeData.cs
- ObjectSecurity.cs
- TextParagraphView.cs
- PreservationFileWriter.cs
- InternalBufferOverflowException.cs
- COM2ExtendedBrowsingHandler.cs
- StrokeNodeOperations.cs
- ListItemCollection.cs
- SqlCommandSet.cs
- HttpCapabilitiesSectionHandler.cs
- Style.cs
- SqlLiftIndependentRowExpressions.cs
- EntityStoreSchemaGenerator.cs
- MsmqIntegrationReceiveParameters.cs
- EntityDataSourceWizardForm.cs
- ColumnWidthChangingEvent.cs
- XmlSchemaCollection.cs
- HwndSource.cs
- WebRequest.cs
- SerializationFieldInfo.cs
- GenerateHelper.cs
- HiddenField.cs
- _HeaderInfoTable.cs
- SubpageParagraph.cs
- WsdlBuildProvider.cs
- ContentElement.cs
- AuthenticateEventArgs.cs
- _ListenerRequestStream.cs
- DBNull.cs
- BCryptNative.cs
- VirtualPathUtility.cs
- BinaryMessageFormatter.cs
- input.cs
- DataGridSortCommandEventArgs.cs
- BinaryNode.cs
- _ContextAwareResult.cs
- ScrollItemPattern.cs
- HttpRuntime.cs
- PixelFormats.cs
- QilList.cs
- ReadOnlyPropertyMetadata.cs
- QilInvokeEarlyBound.cs
- XmlQueryStaticData.cs
- KeyFrames.cs
- SortedDictionary.cs
- TreeView.cs
- ProtectedProviderSettings.cs
- PropertyCollection.cs
- WebPartConnectionsDisconnectVerb.cs
- PropertyExpression.cs
- ObjectDataSourceDisposingEventArgs.cs
- PassportIdentity.cs
- SelfIssuedAuthAsymmetricKey.cs
- IItemProperties.cs
- ValidatedControlConverter.cs
- AutomationFocusChangedEventArgs.cs
- EntityDesignPluralizationHandler.cs
- WebPartCatalogAddVerb.cs
- MenuAutomationPeer.cs
- CodeEntryPointMethod.cs
- XmlSchemaObjectCollection.cs
- Message.cs
- XmlQueryStaticData.cs