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
- SqlProviderServices.cs
- EmptyStringExpandableObjectConverter.cs
- BindingMemberInfo.cs
- SHA256Cng.cs
- securitycriticaldataClass.cs
- XmlDocument.cs
- LinkedResourceCollection.cs
- ObjectSecurity.cs
- SystemInfo.cs
- RadioButtonRenderer.cs
- GreenMethods.cs
- MsmqIntegrationInputChannel.cs
- HtmlMeta.cs
- CursorConverter.cs
- GridEntryCollection.cs
- FixedSchema.cs
- WCFModelStrings.Designer.cs
- DataGridCaption.cs
- NoResizeSelectionBorderGlyph.cs
- RequestQueryParser.cs
- LinearQuaternionKeyFrame.cs
- FixedSOMTableCell.cs
- GPStream.cs
- SkewTransform.cs
- XmlMembersMapping.cs
- SubMenuStyleCollection.cs
- ChangeBlockUndoRecord.cs
- CssClassPropertyAttribute.cs
- ResourcePermissionBase.cs
- Region.cs
- NavigationWindow.cs
- TextEffectResolver.cs
- MultiBindingExpression.cs
- InvalidOleVariantTypeException.cs
- MediaPlayerState.cs
- UIElement.cs
- TextReader.cs
- GroupBoxDesigner.cs
- ProtocolsConfiguration.cs
- ZipArchive.cs
- StringFunctions.cs
- IIS7UserPrincipal.cs
- SqlConnection.cs
- GridViewUpdatedEventArgs.cs
- ColumnWidthChangedEvent.cs
- BaseServiceProvider.cs
- RightsManagementProvider.cs
- EncryptedReference.cs
- ControlIdConverter.cs
- Dispatcher.cs
- SequentialWorkflowRootDesigner.cs
- AutoScrollHelper.cs
- AssemblyAttributesGoHere.cs
- TableLayoutSettingsTypeConverter.cs
- MimeTypeMapper.cs
- HttpListenerPrefixCollection.cs
- ResumeStoryboard.cs
- StickyNoteContentControl.cs
- DataTableReader.cs
- LicenseProviderAttribute.cs
- MapPathBasedVirtualPathProvider.cs
- JoinGraph.cs
- uribuilder.cs
- ButtonChrome.cs
- Camera.cs
- FileLevelControlBuilderAttribute.cs
- InteropBitmapSource.cs
- TableDetailsRow.cs
- ControlParameter.cs
- ProxyWebPartConnectionCollection.cs
- InkSerializer.cs
- XmlSignificantWhitespace.cs
- ToolStripManager.cs
- SafeRightsManagementQueryHandle.cs
- TextComposition.cs
- TextDpi.cs
- StrokeDescriptor.cs
- ToolStripPanelDesigner.cs
- BitArray.cs
- TypeNameHelper.cs
- InputMethodStateChangeEventArgs.cs
- DropSource.cs
- SafePEFileHandle.cs
- CreationContext.cs
- RequiredFieldValidator.cs
- NotCondition.cs
- DocumentScope.cs
- CodeMethodInvokeExpression.cs
- SafeCryptContextHandle.cs
- HyperlinkAutomationPeer.cs
- HelpEvent.cs
- BamlStream.cs
- DataGridHeaderBorder.cs
- AmbiguousMatchException.cs
- ColumnMapVisitor.cs
- WebBrowserDocumentCompletedEventHandler.cs
- SpAudioStreamWrapper.cs
- MappingMetadataHelper.cs
- TextEditorSelection.cs
- ToolStripContainerDesigner.cs