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
- FollowerQueueCreator.cs
- Style.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- ToolboxItemFilterAttribute.cs
- WebPartTransformerCollection.cs
- ItemDragEvent.cs
- HandleCollector.cs
- AnonymousIdentificationModule.cs
- MetaModel.cs
- UnsafeNativeMethodsCLR.cs
- HtmlShimManager.cs
- OleDbRowUpdatedEvent.cs
- RelationshipConstraintValidator.cs
- infer.cs
- WebPartEditorApplyVerb.cs
- HandlerWithFactory.cs
- ValidationHelper.cs
- WebScriptMetadataFormatter.cs
- processwaithandle.cs
- FormsAuthenticationCredentials.cs
- TraceSection.cs
- AffineTransform3D.cs
- CompositeControlDesigner.cs
- SecurityPermission.cs
- MemberMemberBinding.cs
- NodeFunctions.cs
- TrustManagerPromptUI.cs
- CellParaClient.cs
- TypeResolver.cs
- WebHttpDispatchOperationSelectorData.cs
- BigIntegerStorage.cs
- WindowsUpDown.cs
- RemotingServices.cs
- Assert.cs
- SeverityFilter.cs
- NamedObjectList.cs
- AnimationStorage.cs
- MobileListItemCollection.cs
- XmlWhitespace.cs
- RemotingService.cs
- XPathMultyIterator.cs
- PassportAuthenticationModule.cs
- ColumnHeaderConverter.cs
- PrivilegedConfigurationManager.cs
- Configuration.cs
- HttpUnhandledOperationInvoker.cs
- SevenBitStream.cs
- SystemColorTracker.cs
- XNameTypeConverter.cs
- DesignTimeDataBinding.cs
- MatchingStyle.cs
- WebServiceErrorEvent.cs
- ExpandSegment.cs
- SqlConnectionStringBuilder.cs
- XmlNodeList.cs
- StoreItemCollection.Loader.cs
- DataBindingValueUIHandler.cs
- VBIdentifierTrimConverter.cs
- Repeater.cs
- ToolStripGripRenderEventArgs.cs
- UnsafeNativeMethodsPenimc.cs
- OleDbFactory.cs
- PageHandlerFactory.cs
- RankException.cs
- PerformanceCounterPermissionEntryCollection.cs
- DeviceContext.cs
- LoadItemsEventArgs.cs
- NamedPipeAppDomainProtocolHandler.cs
- StreamGeometry.cs
- PhysicalOps.cs
- SHA1CryptoServiceProvider.cs
- URLIdentityPermission.cs
- MembershipSection.cs
- MatrixCamera.cs
- StatusBarPanel.cs
- UrlMappingCollection.cs
- LockCookie.cs
- PageScaling.cs
- DataSourceProvider.cs
- TimeSpanValidatorAttribute.cs
- DecoderFallback.cs
- XamlFxTrace.cs
- CapabilitiesRule.cs
- AssemblySettingAttributes.cs
- IndentedWriter.cs
- SoapCodeExporter.cs
- MsmqIntegrationProcessProtocolHandler.cs
- XmlNavigatorStack.cs
- HttpException.cs
- CngProvider.cs
- HttpCachePolicyElement.cs
- BoundColumn.cs
- _DisconnectOverlappedAsyncResult.cs
- DocumentViewerAutomationPeer.cs
- FloatAverageAggregationOperator.cs
- Set.cs
- MsmqInputChannelListenerBase.cs
- BitmapEffectOutputConnector.cs
- TextServicesCompartmentEventSink.cs
- DBDataPermission.cs