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
- Help.cs
- BitmapVisualManager.cs
- UseLicense.cs
- WebPartRestoreVerb.cs
- TreeWalkHelper.cs
- ConnectionConsumerAttribute.cs
- DataGridHyperlinkColumn.cs
- ConsumerConnectionPointCollection.cs
- MarkupExtensionSerializer.cs
- TreeNodeCollection.cs
- AspProxy.cs
- Point3DAnimationUsingKeyFrames.cs
- Command.cs
- XPathArrayIterator.cs
- TransportOutputChannel.cs
- CollectionChangeEventArgs.cs
- HttpListenerRequest.cs
- BeginEvent.cs
- ProgressBarRenderer.cs
- DataViewListener.cs
- SqlProvider.cs
- ExtendedPropertyCollection.cs
- LinkGrep.cs
- DateTimeSerializationSection.cs
- FormViewInsertEventArgs.cs
- Rectangle.cs
- WebPartAddingEventArgs.cs
- TextTreeFixupNode.cs
- Attribute.cs
- Metadata.cs
- Int32CollectionValueSerializer.cs
- HttpPostedFile.cs
- XamlSerializer.cs
- DataListItemEventArgs.cs
- RenderDataDrawingContext.cs
- PerformanceCounter.cs
- StatusBarItem.cs
- WaitHandle.cs
- DataSetMappper.cs
- DeliveryStrategy.cs
- ToolStripSystemRenderer.cs
- QueryReaderSettings.cs
- DecimalStorage.cs
- RelOps.cs
- ParameterBuilder.cs
- BufferModeSettings.cs
- Baml2006KnownTypes.cs
- ManualResetEvent.cs
- SystemTcpStatistics.cs
- CancelEventArgs.cs
- DataBoundControl.cs
- DetailsViewRow.cs
- KnownBoxes.cs
- StreamUpgradeProvider.cs
- PerfCounterSection.cs
- PerformanceCounterPermissionEntry.cs
- EditorZoneDesigner.cs
- EmbeddedObject.cs
- Expression.DebuggerProxy.cs
- ClipboardProcessor.cs
- WebControlParameterProxy.cs
- DayRenderEvent.cs
- AttributeProviderAttribute.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- CopyCodeAction.cs
- WindowsGraphics2.cs
- DataSpaceManager.cs
- SqlParameterCollection.cs
- HtmlTernaryTree.cs
- LockedActivityGlyph.cs
- KerberosSecurityTokenParameters.cs
- DataFormats.cs
- TextSelectionHelper.cs
- RegexFCD.cs
- EnumerableRowCollectionExtensions.cs
- SearchExpression.cs
- Identity.cs
- XmlDataSource.cs
- FtpCachePolicyElement.cs
- BinaryFormatterWriter.cs
- GridViewEditEventArgs.cs
- ResourceReader.cs
- TakeOrSkipQueryOperator.cs
- SqlMethodTransformer.cs
- WizardPanel.cs
- PolicyImporterElement.cs
- UserControl.cs
- EmissiveMaterial.cs
- LogicalExpressionTypeConverter.cs
- WorkflowInstanceSuspendedRecord.cs
- CompositeCollection.cs
- WMICapabilities.cs
- DataSourceHelper.cs
- _UriSyntax.cs
- ReachPrintTicketSerializerAsync.cs
- XPathArrayIterator.cs
- StickyNote.cs
- EmbeddedMailObjectsCollection.cs
- _StreamFramer.cs
- EntitySetDataBindingList.cs