Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Server / System / Data / Services / ETagAttribute.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TabPanel.cs
- RegexNode.cs
- CancelRequestedRecord.cs
- SafeReversePInvokeHandle.cs
- ToolStripRenderEventArgs.cs
- List.cs
- SqlUserDefinedTypeAttribute.cs
- Parser.cs
- DelegateSerializationHolder.cs
- ConnectionStringSettings.cs
- CompilationRelaxations.cs
- ColorTranslator.cs
- SystemIPGlobalStatistics.cs
- ButtonFieldBase.cs
- XmlWrappingReader.cs
- OdbcConnectionStringbuilder.cs
- FindRequestContext.cs
- MenuItem.cs
- MSAAWinEventWrap.cs
- SizeChangedInfo.cs
- MenuItemBinding.cs
- DataGridViewColumnTypePicker.cs
- XmlSchemaParticle.cs
- GiveFeedbackEvent.cs
- SurrogateDataContract.cs
- XPathAncestorIterator.cs
- CharStorage.cs
- ButtonChrome.cs
- HandlerFactoryCache.cs
- Selector.cs
- PathTooLongException.cs
- ChangeToolStripParentVerb.cs
- XamlPoint3DCollectionSerializer.cs
- tooltip.cs
- Vector3dCollection.cs
- MenuItem.cs
- QueryContinueDragEvent.cs
- StateMachineWorkflowDesigner.cs
- SafeRightsManagementHandle.cs
- x509utils.cs
- SiteMapNodeCollection.cs
- MessageSecurityProtocol.cs
- WebConfigurationManager.cs
- RubberbandSelector.cs
- DataRelation.cs
- MetadataItemEmitter.cs
- counter.cs
- HttpTransportBindingElement.cs
- Stylus.cs
- SBCSCodePageEncoding.cs
- ZipIOBlockManager.cs
- EntityProviderServices.cs
- StructuredTypeEmitter.cs
- XamlNamespaceHelper.cs
- Stylesheet.cs
- CodeGenerator.cs
- UserValidatedEventArgs.cs
- CharAnimationUsingKeyFrames.cs
- XmlAutoDetectWriter.cs
- Button.cs
- NavigationPropertySingletonExpression.cs
- StringFreezingAttribute.cs
- ControlValuePropertyAttribute.cs
- TypeSystemHelpers.cs
- AutomationFocusChangedEventArgs.cs
- CompiledQueryCacheKey.cs
- SafeViewOfFileHandle.cs
- StrokeSerializer.cs
- MaterialGroup.cs
- BindableTemplateBuilder.cs
- ContainerAction.cs
- AnonymousIdentificationSection.cs
- TreeBuilderXamlTranslator.cs
- StorageComplexPropertyMapping.cs
- FixedSOMPageConstructor.cs
- storepermission.cs
- SingleSelectRootGridEntry.cs
- GradientStopCollection.cs
- InputLanguageCollection.cs
- DataGridViewComboBoxEditingControl.cs
- PropertyKey.cs
- Identity.cs
- SynchronizedDisposablePool.cs
- MultiAsyncResult.cs
- UnsafeNativeMethods.cs
- GridViewDesigner.cs
- SerializeAbsoluteContext.cs
- DtdParser.cs
- ServerValidateEventArgs.cs
- InternalReceiveMessage.cs
- XmlCharCheckingWriter.cs
- TemplatedWizardStep.cs
- BaseParagraph.cs
- GeometryGroup.cs
- DesignParameter.cs
- Deflater.cs
- ZipIOExtraFieldPaddingElement.cs
- SafeFileMappingHandle.cs
- GeometryValueSerializer.cs
- XPathNodeInfoAtom.cs