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
- Rotation3D.cs
- UIElement.cs
- SplineQuaternionKeyFrame.cs
- BuildProvidersCompiler.cs
- CompileXomlTask.cs
- SelectedDatesCollection.cs
- NameGenerator.cs
- ViewSimplifier.cs
- ImportCatalogPart.cs
- Bidi.cs
- SqlCacheDependency.cs
- TextSpanModifier.cs
- GenericTypeParameterBuilder.cs
- PrintPageEvent.cs
- Validator.cs
- FloaterParagraph.cs
- ComboBoxRenderer.cs
- DataServiceHost.cs
- CompositionDesigner.cs
- DataView.cs
- TypeContext.cs
- Matrix.cs
- ServiceMetadataExtension.cs
- MouseActionConverter.cs
- TextAdaptor.cs
- panel.cs
- AttributeQuery.cs
- CodeMethodReturnStatement.cs
- SiteMapNodeCollection.cs
- PackageDigitalSignature.cs
- SourceInterpreter.cs
- RuntimeWrappedException.cs
- RenderingEventArgs.cs
- ProfessionalColorTable.cs
- MimeTypePropertyAttribute.cs
- SocketAddress.cs
- CharacterString.cs
- QilTypeChecker.cs
- TypeContext.cs
- MarkerProperties.cs
- DbModificationCommandTree.cs
- SymbolEqualComparer.cs
- MatrixAnimationUsingPath.cs
- XPathExpr.cs
- HighlightComponent.cs
- ObjectContextServiceProvider.cs
- PeerCollaborationPermission.cs
- CounterSample.cs
- XpsViewerException.cs
- ObjectListCommandCollection.cs
- SyntaxCheck.cs
- ReadOnlyDictionary.cs
- ActivationArguments.cs
- AncestorChangedEventArgs.cs
- SyntaxCheck.cs
- JsonDeserializer.cs
- HttpModulesSection.cs
- RelationshipConstraintValidator.cs
- TagNameToTypeMapper.cs
- MultipleViewPattern.cs
- TaiwanLunisolarCalendar.cs
- FacetEnabledSchemaElement.cs
- UniqueIdentifierService.cs
- MailMessage.cs
- DoubleLinkListEnumerator.cs
- SequenceDesigner.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ConstraintConverter.cs
- InstanceCreationEditor.cs
- WebControl.cs
- CodeIndexerExpression.cs
- Membership.cs
- EdmType.cs
- WebBrowserBase.cs
- OrderByQueryOptionExpression.cs
- ExpressionBuilder.cs
- MemberAccessException.cs
- InternalSendMessage.cs
- PerformanceCounterManager.cs
- FileNameEditor.cs
- DependencyPropertyConverter.cs
- MtomMessageEncodingElement.cs
- ProtocolsSection.cs
- CodeDirectiveCollection.cs
- SQLResource.cs
- HttpStreams.cs
- AssemblyCollection.cs
- SqlUnionizer.cs
- SQLBoolean.cs
- DeclarativeExpressionConditionDeclaration.cs
- VersionValidator.cs
- DropShadowBitmapEffect.cs
- Event.cs
- DataControlImageButton.cs
- ReachNamespaceInfo.cs
- ShaderEffect.cs
- ValidatorCollection.cs
- ContentPresenter.cs
- SectionVisual.cs
- XmlReader.cs