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
- RulePatternOps.cs
- ProgressiveCrcCalculatingStream.cs
- HeaderElement.cs
- XmlIncludeAttribute.cs
- HtmlInputButton.cs
- SemanticTag.cs
- TraceLog.cs
- TransformValueSerializer.cs
- URLMembershipCondition.cs
- WrappedReader.cs
- FixedPageAutomationPeer.cs
- RoleGroupCollection.cs
- SafeHandles.cs
- HttpListenerException.cs
- XmlTextWriter.cs
- CodeSnippetExpression.cs
- AnonymousIdentificationSection.cs
- StateManagedCollection.cs
- ObjectManager.cs
- ValidationEventArgs.cs
- IdentityModelDictionary.cs
- NamespaceDisplayAutomationPeer.cs
- DbReferenceCollection.cs
- ParserStack.cs
- EventLogPermissionEntry.cs
- RegionData.cs
- UdpTransportSettings.cs
- CreateUserWizardStep.cs
- OdbcDataAdapter.cs
- IPHostEntry.cs
- FormViewRow.cs
- COM2ICategorizePropertiesHandler.cs
- KeyGestureConverter.cs
- PropertyToken.cs
- MinimizableAttributeTypeConverter.cs
- RSAProtectedConfigurationProvider.cs
- XmlAnyAttributeAttribute.cs
- ExtensionDataObject.cs
- xml.cs
- FastPropertyAccessor.cs
- StorageInfo.cs
- TimeSpanStorage.cs
- ComboBoxAutomationPeer.cs
- XNodeValidator.cs
- TextBox.cs
- XamlPoint3DCollectionSerializer.cs
- mediapermission.cs
- XmlWellformedWriter.cs
- GroupQuery.cs
- KeyboardDevice.cs
- WmlPanelAdapter.cs
- Validator.cs
- StorageComplexTypeMapping.cs
- FlowDocumentPageViewerAutomationPeer.cs
- DynamicILGenerator.cs
- MultiSelectRootGridEntry.cs
- GridViewCommandEventArgs.cs
- CompilerError.cs
- DnsElement.cs
- MembershipPasswordException.cs
- TranslateTransform3D.cs
- SafeSecurityHelper.cs
- ReachFixedDocumentSerializerAsync.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- ImportOptions.cs
- String.cs
- KeyEventArgs.cs
- BinaryConverter.cs
- AuthenticationService.cs
- GeneralTransform3D.cs
- EndpointNameMessageFilter.cs
- QueryOutputWriter.cs
- DbReferenceCollection.cs
- UnsafeNativeMethods.cs
- TripleDESCryptoServiceProvider.cs
- CodePageUtils.cs
- HandlerBase.cs
- FamilyCollection.cs
- ContextProperty.cs
- TableLayoutPanel.cs
- ValidatingReaderNodeData.cs
- TemplateControlBuildProvider.cs
- CounterCreationDataCollection.cs
- OneOfScalarConst.cs
- SymmetricCryptoHandle.cs
- InkPresenter.cs
- BufferedGenericXmlSecurityToken.cs
- Rectangle.cs
- MaskedTextBox.cs
- StaticExtensionConverter.cs
- ThaiBuddhistCalendar.cs
- TransformedBitmap.cs
- FilterableAttribute.cs
- SoapElementAttribute.cs
- DetailsViewUpdateEventArgs.cs
- mda.cs
- DataRelationCollection.cs
- UrlMappingsSection.cs
- TransactionInterop.cs
- PopupRoot.cs