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
- StatusStrip.cs
- CipherData.cs
- WindowProviderWrapper.cs
- ContextMenuService.cs
- FaultDesigner.cs
- ValueSerializerAttribute.cs
- HttpCachePolicy.cs
- SqlNotificationEventArgs.cs
- TemplatePropertyEntry.cs
- WebPartDeleteVerb.cs
- PhoneCall.cs
- OrderedDictionary.cs
- NameValuePair.cs
- DockPanel.cs
- NodeLabelEditEvent.cs
- VectorValueSerializer.cs
- OleDbErrorCollection.cs
- XmlDocumentSchema.cs
- SimpleTypeResolver.cs
- mediaeventargs.cs
- GenerateTemporaryTargetAssembly.cs
- Misc.cs
- EventKeyword.cs
- SqlDataSourceSelectingEventArgs.cs
- DbCommandDefinition.cs
- RegexTree.cs
- InvariantComparer.cs
- SizeAnimationBase.cs
- ChannelManager.cs
- SmiConnection.cs
- MetaColumn.cs
- DoubleAnimation.cs
- ReadOnlyDataSource.cs
- FixUp.cs
- AnimationLayer.cs
- HebrewCalendar.cs
- XmlSchemaRedefine.cs
- RoutedEventHandlerInfo.cs
- CheckBoxField.cs
- Emitter.cs
- log.cs
- GenericIdentity.cs
- SchemaType.cs
- OdbcConnectionOpen.cs
- OdbcPermission.cs
- HtmlElementCollection.cs
- PropertyChangingEventArgs.cs
- InputDevice.cs
- CodeGenerator.cs
- EdmItemError.cs
- GridItemProviderWrapper.cs
- Wizard.cs
- PageStatePersister.cs
- PathData.cs
- PaperSize.cs
- NoClickablePointException.cs
- TablePattern.cs
- OdbcConnectionFactory.cs
- ModelItem.cs
- WindowVisualStateTracker.cs
- CachedPathData.cs
- VersionedStreamOwner.cs
- MailAddress.cs
- Brush.cs
- ServicePrincipalNameElement.cs
- DispatchWrapper.cs
- CacheOutputQuery.cs
- Brush.cs
- WinInetCache.cs
- ChangeTracker.cs
- XsltException.cs
- DiagnosticStrings.cs
- Button.cs
- IxmlLineInfo.cs
- ToolStripDropDownItemDesigner.cs
- BinaryQueryOperator.cs
- EllipseGeometry.cs
- DataGridTableCollection.cs
- SmtpTransport.cs
- ListViewItem.cs
- SqlUnionizer.cs
- LabelLiteral.cs
- DataGridTable.cs
- ParameterBuilder.cs
- DataSourceIDConverter.cs
- CloudCollection.cs
- PolyLineSegmentFigureLogic.cs
- ScriptControl.cs
- SystemMulticastIPAddressInformation.cs
- ListControlConvertEventArgs.cs
- IdentityValidationException.cs
- ExpressionVisitor.cs
- Html32TextWriter.cs
- EntityKeyElement.cs
- UIElementAutomationPeer.cs
- SafeCertificateContext.cs
- ClientTargetCollection.cs
- ListViewTableRow.cs
- UnmanagedMarshal.cs
- NetPeerTcpBindingElement.cs