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
- SafeNativeMethods.cs
- SmiSettersStream.cs
- wgx_commands.cs
- SimpleHandlerBuildProvider.cs
- DataServiceSaveChangesEventArgs.cs
- DetailsViewPagerRow.cs
- DeclarativeCatalogPart.cs
- SqlClientWrapperSmiStream.cs
- GridViewColumn.cs
- WebPartZone.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- SqlGatherProducedAliases.cs
- OperationValidationEventArgs.cs
- FixedTextContainer.cs
- ValidationSummary.cs
- MemberDomainMap.cs
- DataSetMappper.cs
- PermissionAttributes.cs
- SqlConnectionPoolGroupProviderInfo.cs
- HttpRequestContext.cs
- WebConfigurationManager.cs
- AttributedMetaModel.cs
- OdbcError.cs
- TypeGeneratedEventArgs.cs
- Variable.cs
- XPathNodeHelper.cs
- StateManagedCollection.cs
- Vector3DKeyFrameCollection.cs
- ClientConfigPaths.cs
- TextInfo.cs
- Int16.cs
- Connector.cs
- TypeBuilderInstantiation.cs
- PersonalizationState.cs
- SubordinateTransaction.cs
- URLString.cs
- ImportContext.cs
- ChangeConflicts.cs
- HtmlShim.cs
- Int32Rect.cs
- ForeignConstraint.cs
- MembershipUser.cs
- RegexReplacement.cs
- WebException.cs
- EntitySetDataBindingList.cs
- DesignConnectionCollection.cs
- ZipFileInfo.cs
- TableLayoutSettingsTypeConverter.cs
- OracleLob.cs
- SerializationEventsCache.cs
- SerializationInfoEnumerator.cs
- DrawingImage.cs
- ReaderWriterLockWrapper.cs
- StringCollection.cs
- ListenDesigner.cs
- EdmTypeAttribute.cs
- DataGridSortCommandEventArgs.cs
- Panel.cs
- ControlPaint.cs
- LinkAreaEditor.cs
- SrgsGrammar.cs
- TextPointerBase.cs
- XmlSchemaChoice.cs
- AttributeCollection.cs
- CollectionConverter.cs
- Int32Converter.cs
- Rule.cs
- TaskDesigner.cs
- DropDownList.cs
- CodeDefaultValueExpression.cs
- FixedElement.cs
- shaperfactory.cs
- ColumnHeader.cs
- SystemWebSectionGroup.cs
- StretchValidation.cs
- ObservableCollection.cs
- TypeBuilder.cs
- AttachmentCollection.cs
- GenericAuthenticationEventArgs.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- FrameSecurityDescriptor.cs
- SQLMembershipProvider.cs
- StaticDataManager.cs
- IgnorePropertiesAttribute.cs
- Process.cs
- MetadataItemCollectionFactory.cs
- PublisherIdentityPermission.cs
- EventArgs.cs
- AutomationInteropProvider.cs
- UDPClient.cs
- WeakEventManager.cs
- namescope.cs
- ComponentResourceKey.cs
- CacheOutputQuery.cs
- _AuthenticationState.cs
- TakeOrSkipQueryOperator.cs
- NavigatorInput.cs
- StreamGeometry.cs
- ReflectionTypeLoadException.cs
- WS2007HttpBinding.cs