Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / DataServiceKeyAttribute.cs / 2 / 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
- PersonalizationStateInfo.cs
- SemanticResolver.cs
- TickBar.cs
- WsdlImporterElement.cs
- TimeSpanValidatorAttribute.cs
- ProxySimple.cs
- AtomEntry.cs
- Point3DValueSerializer.cs
- DiscoveryDefaults.cs
- NoneExcludedImageIndexConverter.cs
- XmlQueryStaticData.cs
- BindingsCollection.cs
- ToolStripDropDownClosingEventArgs.cs
- safelinkcollection.cs
- SqlNamer.cs
- LinqDataSourceView.cs
- TraceSection.cs
- AssertSection.cs
- Normalization.cs
- Column.cs
- DataServiceStreamResponse.cs
- FormViewRow.cs
- CoTaskMemHandle.cs
- DragStartedEventArgs.cs
- ListSortDescriptionCollection.cs
- PartialCachingAttribute.cs
- _NtlmClient.cs
- XmlUtil.cs
- SpStreamWrapper.cs
- ByeOperationCD1AsyncResult.cs
- arabicshape.cs
- ClientSideQueueItem.cs
- XmlResolver.cs
- XmlElementAttribute.cs
- DelegatedStream.cs
- SqlDataRecord.cs
- PermissionRequestEvidence.cs
- StatusBarPanel.cs
- ValidationResult.cs
- EdmProperty.cs
- BroadcastEventHelper.cs
- AuthenticationManager.cs
- ImageList.cs
- FileInfo.cs
- RIPEMD160Managed.cs
- TemplateInstanceAttribute.cs
- ExecutedRoutedEventArgs.cs
- SchemaImporter.cs
- NativeMethods.cs
- SiteIdentityPermission.cs
- DataDocumentXPathNavigator.cs
- ScrollPattern.cs
- HMACSHA1.cs
- HiddenFieldDesigner.cs
- TreeNodeSelectionProcessor.cs
- X509SecurityTokenAuthenticator.cs
- WebServiceResponse.cs
- HelpEvent.cs
- ExcCanonicalXml.cs
- DataGridItemCollection.cs
- OdbcConnectionStringbuilder.cs
- HostingPreferredMapPath.cs
- MultiSelectRootGridEntry.cs
- WebPartTransformerCollection.cs
- ExtenderProvidedPropertyAttribute.cs
- SoapRpcMethodAttribute.cs
- Ray3DHitTestResult.cs
- HotSpotCollection.cs
- _Connection.cs
- QueryStringConverter.cs
- SessionStateModule.cs
- RectValueSerializer.cs
- SpnEndpointIdentity.cs
- ContextStack.cs
- XmlSchemaCompilationSettings.cs
- EntityDescriptor.cs
- coordinatorfactory.cs
- JsonSerializer.cs
- StyleSelector.cs
- IssuanceTokenProviderState.cs
- contentDescriptor.cs
- DetailsViewRowCollection.cs
- SqlClientWrapperSmiStreamChars.cs
- RtType.cs
- ToolStripContainer.cs
- RtfControls.cs
- TabPanel.cs
- PrintDialogException.cs
- PenLineJoinValidation.cs
- SQLInt64.cs
- XPathNodeInfoAtom.cs
- NullableIntMinMaxAggregationOperator.cs
- TemplateBindingExpressionConverter.cs
- NodeLabelEditEvent.cs
- SpeechEvent.cs
- WebPartUtil.cs
- TrustLevel.cs
- NumericUpDownAcceleration.cs
- CommonRemoteMemoryBlock.cs
- OleDbRowUpdatingEvent.cs