Code:
/ DotNET / DotNET / 8.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
- FileIOPermission.cs
- DataKey.cs
- Enlistment.cs
- EmptyEnumerable.cs
- SafeThemeHandle.cs
- UIPropertyMetadata.cs
- WorkflowHostingEndpoint.cs
- SplitterEvent.cs
- ResourceProperty.cs
- EntityDataSourceChangingEventArgs.cs
- IDReferencePropertyAttribute.cs
- RuntimeConfig.cs
- EmissiveMaterial.cs
- ImageListImageEditor.cs
- SettingsSection.cs
- XmlSchemaCollection.cs
- BodyGlyph.cs
- WindowsStatusBar.cs
- IdentityModelStringsVersion1.cs
- WindowsTooltip.cs
- RemoteWebConfigurationHostStream.cs
- DiscoveryDocumentLinksPattern.cs
- SimpleRecyclingCache.cs
- SqlDataSourceSelectingEventArgs.cs
- CodeObject.cs
- VarRemapper.cs
- JournalNavigationScope.cs
- PointCollection.cs
- TraceInternal.cs
- ListSortDescriptionCollection.cs
- DrawingImage.cs
- EventMappingSettingsCollection.cs
- bidPrivateBase.cs
- StylusPointPropertyUnit.cs
- _SafeNetHandles.cs
- LinkedDataMemberFieldEditor.cs
- UpdatePanelTrigger.cs
- PolygonHotSpot.cs
- ConfigurationProviderException.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- CollectionConverter.cs
- CodeComment.cs
- EventProviderWriter.cs
- CurrentChangingEventManager.cs
- Pens.cs
- UrlAuthorizationModule.cs
- XmlDataImplementation.cs
- XmlElementList.cs
- AtomServiceDocumentSerializer.cs
- ValidatingPropertiesEventArgs.cs
- WaitHandleCannotBeOpenedException.cs
- PerformanceCounterManager.cs
- RuleDefinitions.cs
- ReferenceService.cs
- StringSource.cs
- entityreference_tresulttype.cs
- MembershipSection.cs
- BatchWriter.cs
- PropertyReferenceSerializer.cs
- HtmlControl.cs
- DynamicDiscoSearcher.cs
- FixedSOMPageElement.cs
- Span.cs
- XmlUtil.cs
- PersonalizablePropertyEntry.cs
- PassportAuthenticationEventArgs.cs
- X509SecurityTokenProvider.cs
- SafeArchiveContext.cs
- DrawTreeNodeEventArgs.cs
- StructuralType.cs
- DataRowComparer.cs
- ByteConverter.cs
- ErrorEventArgs.cs
- OptimizedTemplateContentHelper.cs
- StringCollection.cs
- TextEditorDragDrop.cs
- Point3D.cs
- Point3DCollectionValueSerializer.cs
- RemoveStoryboard.cs
- DataPointer.cs
- DataPager.cs
- EnumMember.cs
- Activator.cs
- ChannelServices.cs
- RemoteCryptoRsaServiceProvider.cs
- wgx_exports.cs
- ActiveDesignSurfaceEvent.cs
- MatrixTransform3D.cs
- Calendar.cs
- ResourceIDHelper.cs
- TreeView.cs
- PreDigestedSignedInfo.cs
- FileSystemInfo.cs
- UiaCoreApi.cs
- MissingManifestResourceException.cs
- Margins.cs
- SHA1CryptoServiceProvider.cs
- OrderablePartitioner.cs
- TreeNodeStyleCollection.cs
- HashSetEqualityComparer.cs