Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Net / System / Net / Mail / LinkedResource.cs / 1 / LinkedResource.cs
using System;
using System.IO;
using System.Net.Mime;
using System.Text;
using System.Runtime.Versioning;
namespace System.Net.Mail
{
public class LinkedResource : AttachmentBase
{
internal LinkedResource()
{ }
[ResourceExposure(ResourceScope.Machine)]
[ResourceConsumption(ResourceScope.Machine)]
public LinkedResource(string fileName) :
base(fileName)
{ }
[ResourceExposure(ResourceScope.Machine)]
[ResourceConsumption(ResourceScope.Machine)]
public LinkedResource(string fileName, string mediaType) :
base(fileName, mediaType)
{ }
[ResourceExposure(ResourceScope.Machine)]
[ResourceConsumption(ResourceScope.Machine)]
public LinkedResource(string fileName, ContentType contentType) :
base(fileName, contentType)
{ }
public LinkedResource(Stream contentStream) :
base(contentStream)
{ }
public LinkedResource(Stream contentStream, string mediaType) :
base(contentStream, mediaType)
{ }
public LinkedResource(Stream contentStream, ContentType contentType) :
base(contentStream, contentType)
{ }
public Uri ContentLink
{
get
{
return ContentLocation;
}
set
{
ContentLocation = value;
}
}
public static LinkedResource CreateLinkedResourceFromString(string content){
LinkedResource a = new LinkedResource();
a.SetContentFromString(content, null, String.Empty);
return a;
}
public static LinkedResource CreateLinkedResourceFromString(string content, Encoding contentEncoding, string mediaType){
LinkedResource a = new LinkedResource();
a.SetContentFromString(content, contentEncoding, mediaType);
return a;
}
public static LinkedResource CreateLinkedResourceFromString(string content, ContentType contentType){
LinkedResource a = new LinkedResource();
a.SetContentFromString(content, contentType);
return a;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.IO;
using System.Net.Mime;
using System.Text;
using System.Runtime.Versioning;
namespace System.Net.Mail
{
public class LinkedResource : AttachmentBase
{
internal LinkedResource()
{ }
[ResourceExposure(ResourceScope.Machine)]
[ResourceConsumption(ResourceScope.Machine)]
public LinkedResource(string fileName) :
base(fileName)
{ }
[ResourceExposure(ResourceScope.Machine)]
[ResourceConsumption(ResourceScope.Machine)]
public LinkedResource(string fileName, string mediaType) :
base(fileName, mediaType)
{ }
[ResourceExposure(ResourceScope.Machine)]
[ResourceConsumption(ResourceScope.Machine)]
public LinkedResource(string fileName, ContentType contentType) :
base(fileName, contentType)
{ }
public LinkedResource(Stream contentStream) :
base(contentStream)
{ }
public LinkedResource(Stream contentStream, string mediaType) :
base(contentStream, mediaType)
{ }
public LinkedResource(Stream contentStream, ContentType contentType) :
base(contentStream, contentType)
{ }
public Uri ContentLink
{
get
{
return ContentLocation;
}
set
{
ContentLocation = value;
}
}
public static LinkedResource CreateLinkedResourceFromString(string content){
LinkedResource a = new LinkedResource();
a.SetContentFromString(content, null, String.Empty);
return a;
}
public static LinkedResource CreateLinkedResourceFromString(string content, Encoding contentEncoding, string mediaType){
LinkedResource a = new LinkedResource();
a.SetContentFromString(content, contentEncoding, mediaType);
return a;
}
public static LinkedResource CreateLinkedResourceFromString(string content, ContentType contentType){
LinkedResource a = new LinkedResource();
a.SetContentFromString(content, contentType);
return a;
}
}
}
// 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
- ArrayList.cs
- TableCellAutomationPeer.cs
- RegexCharClass.cs
- RemoteDebugger.cs
- XmlSchemaAnyAttribute.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- CounterSampleCalculator.cs
- CalendarItem.cs
- DecimalAnimationBase.cs
- FatalException.cs
- TextEditorThreadLocalStore.cs
- PrivateFontCollection.cs
- ShapingEngine.cs
- DeflateStreamAsyncResult.cs
- MatchSingleFxEngineOpcode.cs
- NeutralResourcesLanguageAttribute.cs
- SqlRecordBuffer.cs
- CopyCodeAction.cs
- Pts.cs
- ToolBarButton.cs
- VisualTransition.cs
- OdbcPermission.cs
- XmlDocumentSerializer.cs
- BamlLocalizationDictionary.cs
- OracleParameter.cs
- UIElementHelper.cs
- DynamicUpdateCommand.cs
- DataServiceHostWrapper.cs
- BoolExpression.cs
- ActivityBindForm.Designer.cs
- MetadataCache.cs
- MetadataProperty.cs
- XPathNodeIterator.cs
- AmbiguousMatchException.cs
- ProjectedSlot.cs
- XmlSerializerFactory.cs
- CompositeFontFamily.cs
- DataColumn.cs
- SchemaAttDef.cs
- TextTreeUndo.cs
- WsdlBuildProvider.cs
- XhtmlConformanceSection.cs
- ProxyFragment.cs
- ClientBuildManager.cs
- MaxMessageSizeStream.cs
- FacetValueContainer.cs
- XPathNodeInfoAtom.cs
- Transform.cs
- TabPageDesigner.cs
- ContextQuery.cs
- GenericXmlSecurityTokenAuthenticator.cs
- TdsParserSessionPool.cs
- PropertyMetadata.cs
- dbenumerator.cs
- DataBoundControlHelper.cs
- CheckBoxPopupAdapter.cs
- TabPage.cs
- CounterCreationData.cs
- Point3DKeyFrameCollection.cs
- RuleSettingsCollection.cs
- CharStorage.cs
- PipeException.cs
- FieldDescriptor.cs
- SoapClientMessage.cs
- SqlDependencyListener.cs
- PageParserFilter.cs
- StructuredProperty.cs
- MimeWriter.cs
- DeferredTextReference.cs
- Quad.cs
- SqlServer2KCompatibilityAnnotation.cs
- ClientSettingsStore.cs
- SchemaCollectionPreprocessor.cs
- CommonObjectSecurity.cs
- IIS7UserPrincipal.cs
- SequentialWorkflowRootDesigner.cs
- DataViewSetting.cs
- ConfigurationCollectionAttribute.cs
- Viewport2DVisual3D.cs
- CharStorage.cs
- URLString.cs
- _NegoState.cs
- SystemWebCachingSectionGroup.cs
- ToolbarAUtomationPeer.cs
- WebHttpSecurityElement.cs
- glyphs.cs
- CodeDOMUtility.cs
- SerialPort.cs
- SharedStatics.cs
- SpecularMaterial.cs
- ConfigurationProperty.cs
- FormatConvertedBitmap.cs
- columnmapkeybuilder.cs
- ToolStripDropTargetManager.cs
- SqlNotificationRequest.cs
- DrawListViewColumnHeaderEventArgs.cs
- Suspend.cs
- RestHandler.cs
- XmlDictionaryWriter.cs
- ImpersonateTokenRef.cs