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
- PageOrientation.cs
- Animatable.cs
- AssemblyBuilder.cs
- OciEnlistContext.cs
- Property.cs
- EntityStoreSchemaFilterEntry.cs
- QilBinary.cs
- FontFamilyValueSerializer.cs
- CompilationUnit.cs
- X509Chain.cs
- ILGen.cs
- Rect3D.cs
- NestedContainer.cs
- PathSegment.cs
- XsdCachingReader.cs
- ListBindableAttribute.cs
- BaseParagraph.cs
- BridgeDataRecord.cs
- InternalConfigSettingsFactory.cs
- DispatcherHookEventArgs.cs
- XPathNodeList.cs
- BitmapMetadata.cs
- GridViewRow.cs
- HttpWebRequestElement.cs
- ThreadExceptionDialog.cs
- OutputScope.cs
- LowerCaseStringConverter.cs
- EditingCoordinator.cs
- SettingsSavedEventArgs.cs
- Path.cs
- ListBoxItem.cs
- RepeatBehaviorConverter.cs
- WorkflowIdleElement.cs
- Atom10FormatterFactory.cs
- MethodRental.cs
- MasterPage.cs
- SqlRewriteScalarSubqueries.cs
- InputScopeManager.cs
- httpserverutility.cs
- Win32MouseDevice.cs
- DirectoryGroupQuery.cs
- AssemblyLoader.cs
- GetPageNumberCompletedEventArgs.cs
- ProcessStartInfo.cs
- FrameworkElement.cs
- UniqueConstraint.cs
- SystemDiagnosticsSection.cs
- WebConfigurationHost.cs
- InitializerFacet.cs
- SqlDataSourceQueryConverter.cs
- AppliedDeviceFiltersEditor.cs
- ListItemDetailViewAttribute.cs
- Request.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ZipIORawDataFileBlock.cs
- HttpWebRequestElement.cs
- DesignerActionGlyph.cs
- hebrewshape.cs
- NumberSubstitution.cs
- ProgressiveCrcCalculatingStream.cs
- ClipboardData.cs
- Container.cs
- ScriptReferenceBase.cs
- XPathDocumentNavigator.cs
- PageRanges.cs
- ColumnHeaderCollectionEditor.cs
- ObjectDataSourceDisposingEventArgs.cs
- URL.cs
- _NegoState.cs
- LayoutEvent.cs
- ObjectSecurity.cs
- DataGridViewMethods.cs
- Executor.cs
- BitmapEffectCollection.cs
- HttpPostProtocolReflector.cs
- Invariant.cs
- RelationshipWrapper.cs
- sapiproxy.cs
- HtmlEmptyTagControlBuilder.cs
- DataTableExtensions.cs
- ServiceHandle.cs
- SyndicationSerializer.cs
- EntityStoreSchemaGenerator.cs
- Rotation3DAnimationUsingKeyFrames.cs
- UpdateExpressionVisitor.cs
- PaginationProgressEventArgs.cs
- HuffModule.cs
- BitmapEffectGroup.cs
- AccessDataSourceView.cs
- ColorDialog.cs
- DirectoryLocalQuery.cs
- CookielessHelper.cs
- OracleBinary.cs
- Soap.cs
- XmlWellformedWriter.cs
- AppSettingsExpressionBuilder.cs
- SourceElementsCollection.cs
- Process.cs
- SkipStoryboardToFill.cs
- ApplyTemplatesAction.cs