Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Mail / AlternateView.cs / 1 / AlternateView.cs
using System; using System.IO; using System.Net.Mime; using System.Text; namespace System.Net.Mail { public class AlternateView : AttachmentBase { private LinkedResourceCollection linkedResources; internal AlternateView() { } public AlternateView(string fileName) : base(fileName) { } public AlternateView(string fileName, string mediaType) : base(fileName, mediaType) { } public AlternateView(string fileName, ContentType contentType) : base(fileName, contentType) { } public AlternateView(Stream contentStream) : base(contentStream) { } public AlternateView(Stream contentStream, string mediaType) : base(contentStream, mediaType) { } public AlternateView(Stream contentStream, ContentType contentType) : base(contentStream, contentType) { } public LinkedResourceCollection LinkedResources { get { if (disposed) { throw new ObjectDisposedException(this.GetType().FullName); } if (linkedResources == null) { linkedResources = new LinkedResourceCollection(); } return linkedResources; } } public Uri BaseUri { get { return ContentLocation; } set { ContentLocation = value; } } public static AlternateView CreateAlternateViewFromString(string content){ AlternateView a = new AlternateView(); a.SetContentFromString(content, null, String.Empty); return a; } public static AlternateView CreateAlternateViewFromString(string content, Encoding contentEncoding, string mediaType){ AlternateView a = new AlternateView(); a.SetContentFromString(content, contentEncoding, mediaType); return a; } public static AlternateView CreateAlternateViewFromString(string content, ContentType contentType){ AlternateView a = new AlternateView(); a.SetContentFromString(content, contentType); return a; } protected override void Dispose(bool disposing) { if(disposed){ return; } if (disposing && linkedResources != null) { linkedResources.Dispose(); } base.Dispose(disposing); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ComponentResourceKeyConverter.cs
- DrawListViewSubItemEventArgs.cs
- DBConcurrencyException.cs
- ServiceBusyException.cs
- ParameterCollection.cs
- DbConnectionPoolGroup.cs
- DirectoryRedirect.cs
- ProxyWebPart.cs
- DataSource.cs
- ContactManager.cs
- NaturalLanguageHyphenator.cs
- SignedXmlDebugLog.cs
- CachingHintValidation.cs
- SiteMapDataSourceDesigner.cs
- DataViewListener.cs
- TextFormatterImp.cs
- Line.cs
- DataList.cs
- OletxResourceManager.cs
- SubpageParaClient.cs
- HttpCapabilitiesEvaluator.cs
- BamlLocalizableResource.cs
- GroupStyle.cs
- Part.cs
- WebPartPersonalization.cs
- WebPartEditVerb.cs
- ExpandSegment.cs
- ReadOnlyPropertyMetadata.cs
- WindowVisualStateTracker.cs
- RefType.cs
- ComplexBindingPropertiesAttribute.cs
- FreezableOperations.cs
- MetaDataInfo.cs
- XpsSerializerWriter.cs
- ReadOnlyMetadataCollection.cs
- DSASignatureDeformatter.cs
- SafeRightsManagementHandle.cs
- FloaterBaseParaClient.cs
- RequestCachingSection.cs
- SafeRightsManagementHandle.cs
- ParameterCollection.cs
- AutomationPropertyInfo.cs
- Adorner.cs
- InstanceOwnerException.cs
- controlskin.cs
- ProviderSettingsCollection.cs
- GcSettings.cs
- OdbcConnectionPoolProviderInfo.cs
- EventLogRecord.cs
- XmlSchemaSimpleContentExtension.cs
- TraceContextRecord.cs
- FamilyMap.cs
- Point4D.cs
- CurrentChangedEventManager.cs
- InputQueue.cs
- RequestCache.cs
- EventTrigger.cs
- SqlRowUpdatingEvent.cs
- RegexEditorDialog.cs
- ForwardPositionQuery.cs
- XmlQueryCardinality.cs
- StorageEntityContainerMapping.cs
- EventListenerClientSide.cs
- XmlParserContext.cs
- CharAnimationBase.cs
- CellParagraph.cs
- SatelliteContractVersionAttribute.cs
- CodeParameterDeclarationExpression.cs
- EdmSchemaError.cs
- ColorConverter.cs
- EndGetFileNameFromUserRequest.cs
- NoneExcludedImageIndexConverter.cs
- CommandPlan.cs
- BitmapEffectGroup.cs
- GroupAggregateExpr.cs
- ManagementPath.cs
- SqlStatistics.cs
- CodeArrayCreateExpression.cs
- Buffer.cs
- UnmanagedHandle.cs
- CallContext.cs
- CollectionContainer.cs
- OpCopier.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ObjectContextServiceProvider.cs
- GeneralTransform.cs
- Accessible.cs
- EmissiveMaterial.cs
- MSAAEventDispatcher.cs
- ContentFileHelper.cs
- VariantWrapper.cs
- EntityRecordInfo.cs
- PaintEvent.cs
- CodeThrowExceptionStatement.cs
- HttpSessionStateBase.cs
- DataColumnPropertyDescriptor.cs
- InputBuffer.cs
- EventToken.cs
- TemplateBuilder.cs
- ViewLoader.cs