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
- FormViewPageEventArgs.cs
- Rotation3DAnimationBase.cs
- SafeArchiveContext.cs
- MediaCommands.cs
- RadioButtonPopupAdapter.cs
- BorderGapMaskConverter.cs
- CssClassPropertyAttribute.cs
- GridViewColumnHeaderAutomationPeer.cs
- CodeExpressionStatement.cs
- WmlLabelAdapter.cs
- SelectedPathEditor.cs
- StylusButtonEventArgs.cs
- WindowsToolbarAsMenu.cs
- CheckBox.cs
- SqlAggregateChecker.cs
- CdpEqualityComparer.cs
- Frame.cs
- IntPtr.cs
- DataGridViewAdvancedBorderStyle.cs
- DBSqlParserTable.cs
- FileIOPermission.cs
- LayoutManager.cs
- KeyboardEventArgs.cs
- NetworkInformationPermission.cs
- DetailsViewUpdateEventArgs.cs
- StylusPlugin.cs
- IntSecurity.cs
- PropertyEntry.cs
- GridViewColumnHeaderAutomationPeer.cs
- NavigationPropertyEmitter.cs
- ConfigDefinitionUpdates.cs
- SmiRequestExecutor.cs
- BindingGroup.cs
- TemplateControl.cs
- DesignerActionItem.cs
- AssemblyGen.cs
- PropertyDescriptorComparer.cs
- Dictionary.cs
- QuaternionIndependentAnimationStorage.cs
- TextTreeText.cs
- SqlCacheDependency.cs
- followingquery.cs
- XmlCharacterData.cs
- CompressEmulationStream.cs
- ProfessionalColors.cs
- SynchronizationContext.cs
- EventLogPermissionEntryCollection.cs
- DataGridViewElement.cs
- IISMapPath.cs
- DeviceContext2.cs
- XmlCodeExporter.cs
- RegistrationServices.cs
- WebBrowserDesigner.cs
- SqlCommandBuilder.cs
- BooleanSwitch.cs
- TheQuery.cs
- ThreadInterruptedException.cs
- SourceFileInfo.cs
- SoapFaultCodes.cs
- GetIndexBinder.cs
- NewItemsContextMenuStrip.cs
- CopyOnWriteList.cs
- versioninfo.cs
- DocumentGridPage.cs
- ListenerAdapter.cs
- StreamUpgradeProvider.cs
- XmlCollation.cs
- Win32NamedPipes.cs
- Debug.cs
- TypeDescriptionProviderAttribute.cs
- GeometryDrawing.cs
- ControlBuilder.cs
- SHA256.cs
- WeakReferenceList.cs
- Error.cs
- Util.cs
- XpsLiterals.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- TemplateControlCodeDomTreeGenerator.cs
- ServiceDescriptions.cs
- WorkflowOperationFault.cs
- RadioButtonPopupAdapter.cs
- StringInfo.cs
- OleDbTransaction.cs
- ThicknessConverter.cs
- SegmentTree.cs
- HtmlProps.cs
- NamespaceEmitter.cs
- Opcode.cs
- StringDictionaryCodeDomSerializer.cs
- NumberFunctions.cs
- UrlAuthFailedErrorFormatter.cs
- SrgsRuleRef.cs
- LinqDataSourceHelper.cs
- dbdatarecord.cs
- AssemblyName.cs
- UpWmlPageAdapter.cs
- ImageAutomationPeer.cs
- ManagementOperationWatcher.cs
- MailAddressCollection.cs