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
- ReferencedAssembly.cs
- SqlDataSourceSelectingEventArgs.cs
- XmlFormatExtensionPointAttribute.cs
- Wizard.cs
- ScrollEvent.cs
- XmlArrayItemAttributes.cs
- TreeNode.cs
- BehaviorEditorPart.cs
- compensatingcollection.cs
- ProcessInfo.cs
- XmlSchemaAttributeGroupRef.cs
- EmissiveMaterial.cs
- WebPartConnectionsCloseVerb.cs
- NavigationProperty.cs
- FeatureSupport.cs
- SimpleType.cs
- Comparer.cs
- ValueConversionAttribute.cs
- HandledEventArgs.cs
- DesignerListAdapter.cs
- HttpListenerContext.cs
- GradientBrush.cs
- PartDesigner.cs
- PartialTrustVisibleAssembly.cs
- StrongNameMembershipCondition.cs
- SecurityContext.cs
- SerializationException.cs
- NativeDirectoryServicesQueryAPIs.cs
- BindingParameterCollection.cs
- TemplateBindingExpressionConverter.cs
- objectquery_tresulttype.cs
- SqlParameterizer.cs
- StorageFunctionMapping.cs
- LambdaExpression.cs
- TdsParserStaticMethods.cs
- DataGridViewBand.cs
- XsdBuildProvider.cs
- DataContractJsonSerializerOperationBehavior.cs
- GraphicsPathIterator.cs
- PropertySourceInfo.cs
- DragEvent.cs
- UrlAuthorizationModule.cs
- StreamWriter.cs
- CloudCollection.cs
- PackWebRequest.cs
- SecurityTokenSerializer.cs
- ScriptDescriptor.cs
- ObjectSecurityT.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- SubstitutionList.cs
- GridViewColumnCollectionChangedEventArgs.cs
- TextTreeUndo.cs
- COM2ColorConverter.cs
- Helpers.cs
- QilName.cs
- UnsafeNativeMethodsTablet.cs
- DataTablePropertyDescriptor.cs
- DesignTimeParseData.cs
- NameObjectCollectionBase.cs
- QueryStringParameter.cs
- X509Logo.cs
- FontUnitConverter.cs
- BrowserDefinitionCollection.cs
- SoapTypeAttribute.cs
- SettingsSavedEventArgs.cs
- StrongNameKeyPair.cs
- PagerSettings.cs
- SmiTypedGetterSetter.cs
- XmlILConstructAnalyzer.cs
- StorageFunctionMapping.cs
- OleDbMetaDataFactory.cs
- AccessViolationException.cs
- CommandEventArgs.cs
- TreeNodeBinding.cs
- ObjectHandle.cs
- GeometryCollection.cs
- MachineKeyConverter.cs
- UnsafeNativeMethods.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- RemotingException.cs
- odbcmetadatafactory.cs
- ContextQuery.cs
- FixedDocument.cs
- safex509handles.cs
- xml.cs
- SqlInternalConnection.cs
- QilTypeChecker.cs
- UrlMappingsModule.cs
- Zone.cs
- MessageDecoder.cs
- WindowsGraphics2.cs
- cookiecontainer.cs
- DesignerHelpers.cs
- ConnectionInterfaceCollection.cs
- StringFormat.cs
- EventProviderWriter.cs
- ToolStripSystemRenderer.cs
- BindingsCollection.cs
- FrameworkElement.cs
- RestrictedTransactionalPackage.cs