Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Mail / AlternateView.cs / 1305376 / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NotifyInputEventArgs.cs
- Rotation3DAnimationBase.cs
- InternalCache.cs
- ContractReference.cs
- ValueOfAction.cs
- BitmapCodecInfoInternal.cs
- SqlDelegatedTransaction.cs
- NativeCppClassAttribute.cs
- SafeHandles.cs
- RectangleGeometry.cs
- StyleBamlTreeBuilder.cs
- MediaContextNotificationWindow.cs
- BitmapVisualManager.cs
- CLRBindingWorker.cs
- SqlDataSourceCache.cs
- SoapInteropTypes.cs
- StyleXamlParser.cs
- XmlSchemaSimpleContentExtension.cs
- TextEffectResolver.cs
- FixedTextContainer.cs
- AssemblyName.cs
- CancellationTokenSource.cs
- RegistryPermission.cs
- SqlMethodTransformer.cs
- FileChangesMonitor.cs
- XmlArrayItemAttributes.cs
- TextElementEnumerator.cs
- HttpListenerTimeoutManager.cs
- XmlNamedNodeMap.cs
- EventMappingSettingsCollection.cs
- SqlInternalConnection.cs
- InvalidOperationException.cs
- StoryFragments.cs
- VirtualStackFrame.cs
- UpdateExpressionVisitor.cs
- Util.cs
- DesignerTransactionCloseEvent.cs
- FolderBrowserDialogDesigner.cs
- DataTableReader.cs
- PasswordDeriveBytes.cs
- WorkflowInspectionServices.cs
- FilterQuery.cs
- AbstractSvcMapFileLoader.cs
- UnitControl.cs
- TempFiles.cs
- XsltCompileContext.cs
- SplayTreeNode.cs
- NullRuntimeConfig.cs
- ParameterBuilder.cs
- DLinqAssociationProvider.cs
- wmiprovider.cs
- BindingValueChangedEventArgs.cs
- StorageAssociationTypeMapping.cs
- ErrorWebPart.cs
- ContentFileHelper.cs
- DispatcherObject.cs
- PingReply.cs
- PropertyNames.cs
- LinkAreaEditor.cs
- AsyncParams.cs
- DataGridViewRow.cs
- TCEAdapterGenerator.cs
- SqlGenericUtil.cs
- LineBreakRecord.cs
- FileDialogCustomPlacesCollection.cs
- DataColumnChangeEvent.cs
- AuthenticationSection.cs
- HtmlTable.cs
- TextElementEnumerator.cs
- PointHitTestParameters.cs
- SiteMapNode.cs
- MailHeaderInfo.cs
- codemethodreferenceexpression.cs
- securitycriticaldataClass.cs
- PropertyGeneratedEventArgs.cs
- CustomTypeDescriptor.cs
- LineGeometry.cs
- IndicShape.cs
- AsymmetricKeyExchangeFormatter.cs
- ComponentDispatcherThread.cs
- ItemMap.cs
- AncestorChangedEventArgs.cs
- HwndSource.cs
- Soap12FormatExtensions.cs
- X509PeerCertificateAuthentication.cs
- SessionStateItemCollection.cs
- QueryCorrelationInitializer.cs
- ThreadPool.cs
- UnionExpr.cs
- TextRunCacheImp.cs
- BinaryObjectWriter.cs
- HostingEnvironmentException.cs
- SystemInfo.cs
- ComponentCollection.cs
- PropertyChangedEventManager.cs
- UIElement.cs
- CodeFieldReferenceExpression.cs
- DocComment.cs
- ListCommandEventArgs.cs
- ResourceReader.cs