Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / MimeTypePropertyAttribute.cs / 1305376 / MimeTypePropertyAttribute.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Attribute to denote entity types describing a media entry
//
//---------------------------------------------------------------------
namespace System.Data.Services.Client
{
using System;
///
/// This attribute indicates another property in the same type that
/// contains the MIME type that should be used for the data contained
/// in the property this attribute is applied to.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class MimeTypePropertyAttribute : Attribute
{
/// The name of the property that contains the data
private readonly string dataPropertyName;
/// The name of the property that contains the mime type
private readonly string mimeTypePropertyName;
///
/// Creates a new instance of this attribute pointing to a particular
/// property to be used for the MIME type
///
/// Name of the property holding the data
/// Name of the property holding the MIME type
public MimeTypePropertyAttribute(string dataPropertyName, string mimeTypePropertyName)
{
this.dataPropertyName = dataPropertyName;
this.mimeTypePropertyName = mimeTypePropertyName;
}
/// The name of the property that contains the data.
public string DataPropertyName
{
get { return this.dataPropertyName; }
}
/// The name of the property that contains the mime type
public string MimeTypePropertyName
{
get { return this.mimeTypePropertyName; }
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Attribute to denote entity types describing a media entry
//
//---------------------------------------------------------------------
namespace System.Data.Services.Client
{
using System;
///
/// This attribute indicates another property in the same type that
/// contains the MIME type that should be used for the data contained
/// in the property this attribute is applied to.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class MimeTypePropertyAttribute : Attribute
{
/// The name of the property that contains the data
private readonly string dataPropertyName;
/// The name of the property that contains the mime type
private readonly string mimeTypePropertyName;
///
/// Creates a new instance of this attribute pointing to a particular
/// property to be used for the MIME type
///
/// Name of the property holding the data
/// Name of the property holding the MIME type
public MimeTypePropertyAttribute(string dataPropertyName, string mimeTypePropertyName)
{
this.dataPropertyName = dataPropertyName;
this.mimeTypePropertyName = mimeTypePropertyName;
}
/// The name of the property that contains the data.
public string DataPropertyName
{
get { return this.dataPropertyName; }
}
/// The name of the property that contains the mime type
public string MimeTypePropertyName
{
get { return this.mimeTypePropertyName; }
}
}
}
// 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
- Trace.cs
- BindValidationContext.cs
- ControlCodeDomSerializer.cs
- WebPartsPersonalization.cs
- HttpCapabilitiesEvaluator.cs
- FileDialogCustomPlacesCollection.cs
- MsmqReceiveHelper.cs
- ReferenceTypeElement.cs
- SequenceFullException.cs
- sqlcontext.cs
- StatusBarDrawItemEvent.cs
- BindingGroup.cs
- ThreadStartException.cs
- SmtpNtlmAuthenticationModule.cs
- MissingMethodException.cs
- BoolExpression.cs
- DetailsViewModeEventArgs.cs
- DateTimeParse.cs
- SiteMapSection.cs
- ProgressBarHighlightConverter.cs
- ExpressionTable.cs
- HttpDebugHandler.cs
- XPathException.cs
- IssuedTokenParametersElement.cs
- MetadataUtilsSmi.cs
- ConsoleKeyInfo.cs
- SessionIDManager.cs
- PrimitiveXmlSerializers.cs
- CharacterHit.cs
- PopupRoot.cs
- LineServicesCallbacks.cs
- PrimaryKeyTypeConverter.cs
- XpsDigitalSignature.cs
- DataGridViewComboBoxColumnDesigner.cs
- ReadOnlyObservableCollection.cs
- XmlCountingReader.cs
- HoistedLocals.cs
- QilExpression.cs
- StringAnimationBase.cs
- DockProviderWrapper.cs
- Rijndael.cs
- SerializerDescriptor.cs
- StreamBodyWriter.cs
- ReaderOutput.cs
- WebPartTransformerCollection.cs
- AssociationType.cs
- TreeNodeCollection.cs
- DataGridRowsPresenter.cs
- ObservableDictionary.cs
- Ops.cs
- Parser.cs
- CounterSample.cs
- LateBoundChannelParameterCollection.cs
- PeerName.cs
- CodeCastExpression.cs
- MoveSizeWinEventHandler.cs
- XPathParser.cs
- CodeNamespaceCollection.cs
- FormViewDeletedEventArgs.cs
- TextReader.cs
- RichTextBoxConstants.cs
- CodeBinaryOperatorExpression.cs
- ProgressPage.cs
- CompressStream.cs
- FloaterBaseParagraph.cs
- CodeMemberProperty.cs
- Converter.cs
- XmlSchemaChoice.cs
- EncoderParameters.cs
- HierarchicalDataSourceControl.cs
- VirtualizedCellInfoCollection.cs
- DynamicFilterExpression.cs
- ServiceObjectContainer.cs
- SimpleApplicationHost.cs
- HttpRequest.cs
- StateFinalizationActivity.cs
- VoiceInfo.cs
- InvalidPropValue.cs
- figurelengthconverter.cs
- XmlSchemaAny.cs
- SqlRowUpdatingEvent.cs
- ClientRoleProvider.cs
- CharStorage.cs
- PrintingPermission.cs
- AVElementHelper.cs
- CommonGetThemePartSize.cs
- SoapWriter.cs
- FrameworkTemplate.cs
- ImagingCache.cs
- HScrollBar.cs
- FilterEventArgs.cs
- CompilationLock.cs
- EventMappingSettingsCollection.cs
- DataGridViewCheckBoxCell.cs
- CssTextWriter.cs
- UnmanagedHandle.cs
- TreeViewDataItemAutomationPeer.cs
- ItemMap.cs
- DataGridSortCommandEventArgs.cs
- EncoderParameter.cs