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
- Decorator.cs
- CriticalHandle.cs
- UndoEngine.cs
- SystemIcons.cs
- EnvelopedPkcs7.cs
- xmlNames.cs
- SafeIUnknown.cs
- DataGridViewControlCollection.cs
- CheckBoxRenderer.cs
- ObjectQuery.cs
- AttributeSetAction.cs
- PropertySourceInfo.cs
- PenContext.cs
- SoapExtensionTypeElementCollection.cs
- CriticalFinalizerObject.cs
- DefaultSettingsSection.cs
- PictureBox.cs
- RunWorkerCompletedEventArgs.cs
- HotSpotCollection.cs
- ConcatQueryOperator.cs
- TaiwanLunisolarCalendar.cs
- CipherData.cs
- FixUp.cs
- CodeDomDecompiler.cs
- Activator.cs
- DesignerDataSourceView.cs
- EntryPointNotFoundException.cs
- SelectionProviderWrapper.cs
- Int32Rect.cs
- SortAction.cs
- BamlStream.cs
- Image.cs
- TextContainerHelper.cs
- XmlCustomFormatter.cs
- DataQuery.cs
- PolicyDesigner.cs
- NativeCppClassAttribute.cs
- CodeEntryPointMethod.cs
- TdsParameterSetter.cs
- CompilationPass2TaskInternal.cs
- Completion.cs
- DataColumnMappingCollection.cs
- SpotLight.cs
- TextPointer.cs
- WorkflowItemsPresenter.cs
- QilVisitor.cs
- SHA1CryptoServiceProvider.cs
- DataColumn.cs
- DataGridViewCell.cs
- WebPartMovingEventArgs.cs
- ChannelServices.cs
- CodeGotoStatement.cs
- DragEvent.cs
- SiteMapNodeItem.cs
- CqlParser.cs
- Attributes.cs
- PointHitTestParameters.cs
- HttpRawResponse.cs
- CapiNative.cs
- TypefaceMetricsCache.cs
- ListChangedEventArgs.cs
- PriorityItem.cs
- CodeDomConfigurationHandler.cs
- DataException.cs
- ProcessHostServerConfig.cs
- UInt32Converter.cs
- DbParameterCollectionHelper.cs
- XmlNode.cs
- Vector3DAnimation.cs
- ListControl.cs
- FlowDocumentPaginator.cs
- Itemizer.cs
- SizeChangedInfo.cs
- XmlParserContext.cs
- StateMachineWorkflow.cs
- MeasureItemEvent.cs
- TreeViewDesigner.cs
- CopyAttributesAction.cs
- PagesSection.cs
- SByteConverter.cs
- BasicCommandTreeVisitor.cs
- PiiTraceSource.cs
- StorageScalarPropertyMapping.cs
- FileClassifier.cs
- AutomationPatternInfo.cs
- IPEndPoint.cs
- DesignerAttribute.cs
- VirtualDirectoryMapping.cs
- XmlAttributeOverrides.cs
- AlternateView.cs
- DetailsViewPagerRow.cs
- RefreshPropertiesAttribute.cs
- StaticFileHandler.cs
- SoapCommonClasses.cs
- AnonymousIdentificationSection.cs
- EnumerableRowCollectionExtensions.cs
- UnionExpr.cs
- VirtualDirectoryMappingCollection.cs
- CorrelationService.cs
- AppDomainFactory.cs