Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataWeb / Server / System / Data / Services / ETagAttribute.cs / 1 / ETagAttribute.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // //// CLR attribute to be annotated on types which indicate the list of properties // form the ETag. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services { using System; using System.Collections.Generic; using System.Collections.ObjectModel; ///Attribute to be annotated on types with ETags. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments", Justification = "Processed value is available")] [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] public sealed class ETagAttribute : System.Attribute { ///Name of the properties that form the ETag. private readonly ReadOnlyCollectionpropertyNames; // This constructor was added since string[] is not a CLS-compliant type and // compiler gives a warning as error saying this attribute doesn't have any // constructor that takes CLS-compliant type /// /// Initializes a new instance of ETag attribute with the property name /// that forms the ETag. /// /// Name of the property that form the ETag for the current type. public ETagAttribute(string propertyName) { WebUtil.CheckArgumentNull(propertyName, "propertyName"); this.propertyNames = new ReadOnlyCollection(new List (new string[1] { propertyName })); } /// /// Initializes a new instance of ETag attribute with the list of property names /// that form the ETag. /// /// Name of the properties that form the ETag for the current type. public ETagAttribute(params string[] propertyNames) { WebUtil.CheckArgumentNull(propertyNames, "propertyNames"); if (propertyNames.Length == 0) { throw new ArgumentException(Strings.ETagAttribute_MustSpecifyAtleastOnePropertyName, "propertyNames"); } this.propertyNames = new ReadOnlyCollection(new List (propertyNames)); } /// Name of the properties that form the ETag for the current type. public ReadOnlyCollectionPropertyNames { get { return this.propertyNames; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // //// CLR attribute to be annotated on types which indicate the list of properties // form the ETag. // // // @owner [....] //--------------------------------------------------------------------- namespace System.Data.Services { using System; using System.Collections.Generic; using System.Collections.ObjectModel; ///Attribute to be annotated on types with ETags. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments", Justification = "Processed value is available")] [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] public sealed class ETagAttribute : System.Attribute { ///Name of the properties that form the ETag. private readonly ReadOnlyCollectionpropertyNames; // This constructor was added since string[] is not a CLS-compliant type and // compiler gives a warning as error saying this attribute doesn't have any // constructor that takes CLS-compliant type /// /// Initializes a new instance of ETag attribute with the property name /// that forms the ETag. /// /// Name of the property that form the ETag for the current type. public ETagAttribute(string propertyName) { WebUtil.CheckArgumentNull(propertyName, "propertyName"); this.propertyNames = new ReadOnlyCollection(new List (new string[1] { propertyName })); } /// /// Initializes a new instance of ETag attribute with the list of property names /// that form the ETag. /// /// Name of the properties that form the ETag for the current type. public ETagAttribute(params string[] propertyNames) { WebUtil.CheckArgumentNull(propertyNames, "propertyNames"); if (propertyNames.Length == 0) { throw new ArgumentException(Strings.ETagAttribute_MustSpecifyAtleastOnePropertyName, "propertyNames"); } this.propertyNames = new ReadOnlyCollection(new List (propertyNames)); } /// Name of the properties that form the ETag for the current type. public ReadOnlyCollectionPropertyNames { get { return this.propertyNames; } } } } // 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
- Duration.cs
- SecurityUniqueId.cs
- XmlNamespaceMappingCollection.cs
- DataTemplate.cs
- ThreadStartException.cs
- CompiledXpathExpr.cs
- HtmlInputImage.cs
- ArithmeticException.cs
- XmlAttributeCollection.cs
- ClientBuildManagerCallback.cs
- BuildProviderUtils.cs
- BCLDebug.cs
- NullableDoubleMinMaxAggregationOperator.cs
- InlineCollection.cs
- PreProcessInputEventArgs.cs
- SynchronizationFilter.cs
- PartialArray.cs
- AtomMaterializerLog.cs
- EncoderReplacementFallback.cs
- Highlights.cs
- WebAdminConfigurationHelper.cs
- ValidationErrorEventArgs.cs
- View.cs
- WriteFileContext.cs
- IList.cs
- XmlDigitalSignatureProcessor.cs
- Blend.cs
- SharedPersonalizationStateInfo.cs
- ConsumerConnectionPointCollection.cs
- CodePageEncoding.cs
- PartialCachingControl.cs
- HwndSource.cs
- TemplatePagerField.cs
- XmlSchemaCollection.cs
- ChannelDemuxer.cs
- ThousandthOfEmRealPoints.cs
- cryptoapiTransform.cs
- Transform3D.cs
- RewritingValidator.cs
- FreezableCollection.cs
- SmtpSection.cs
- CodeTypeParameterCollection.cs
- SuppressMessageAttribute.cs
- PagerSettings.cs
- TagElement.cs
- ParameterToken.cs
- OleDbConnectionFactory.cs
- ObjectViewFactory.cs
- PassportAuthenticationModule.cs
- LineSegment.cs
- Set.cs
- SafeSecurityHandles.cs
- CheckBoxFlatAdapter.cs
- XmlSchemaGroup.cs
- ErrorWrapper.cs
- KeysConverter.cs
- ApplicationGesture.cs
- ProviderManager.cs
- FontNamesConverter.cs
- RelatedView.cs
- ConditionCollection.cs
- AddInIpcChannel.cs
- LabelDesigner.cs
- CorrelationQuery.cs
- ToolStripProgressBar.cs
- QilXmlReader.cs
- DrawingContextWalker.cs
- InputScopeNameConverter.cs
- Material.cs
- PrintDialog.cs
- Main.cs
- AsnEncodedData.cs
- DataGridRowClipboardEventArgs.cs
- TextProviderWrapper.cs
- Gdiplus.cs
- SafeNativeMethodsMilCoreApi.cs
- ConfigurationProperty.cs
- GeometryConverter.cs
- PropertyMapper.cs
- _ProxyChain.cs
- DataControlCommands.cs
- BinHexEncoder.cs
- TabControl.cs
- TrustSection.cs
- BookmarkEventArgs.cs
- iisPickupDirectory.cs
- SubqueryRules.cs
- ArgumentOutOfRangeException.cs
- ScrollViewerAutomationPeer.cs
- ContractValidationHelper.cs
- LogicalMethodInfo.cs
- Triangle.cs
- Registry.cs
- ValuePatternIdentifiers.cs
- Group.cs
- DrawingContextDrawingContextWalker.cs
- EntityConnectionStringBuilderItem.cs
- Graph.cs
- SctClaimSerializer.cs
- ListViewInsertedEventArgs.cs