Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- TextLineResult.cs
- PrintDialog.cs
- HttpHandlerAction.cs
- CommandValueSerializer.cs
- SqlDataSourceEnumerator.cs
- NameObjectCollectionBase.cs
- BamlMapTable.cs
- ReverseQueryOperator.cs
- StopStoryboard.cs
- EventTrigger.cs
- FileLogRecordStream.cs
- DeflateEmulationStream.cs
- OdbcConnection.cs
- RMEnrollmentPage1.cs
- __Filters.cs
- StartUpEventArgs.cs
- TaskHelper.cs
- TypeTypeConverter.cs
- OleDbRowUpdatedEvent.cs
- OracleConnection.cs
- DesigntimeLicenseContextSerializer.cs
- DocumentGridContextMenu.cs
- MenuTracker.cs
- ArrayMergeHelper.cs
- XmlSchemaIdentityConstraint.cs
- Common.cs
- StrokeNodeOperations.cs
- OptimisticConcurrencyException.cs
- SystemWebSectionGroup.cs
- DiscoveryReferences.cs
- StringResourceManager.cs
- Durable.cs
- MatrixCamera.cs
- embossbitmapeffect.cs
- IndexingContentUnit.cs
- Identity.cs
- ProxyFragment.cs
- BrowserCapabilitiesCodeGenerator.cs
- BaseAddressElementCollection.cs
- HttpContextWrapper.cs
- ClientConfigurationHost.cs
- ProxyElement.cs
- EpmContentSerializer.cs
- UnicodeEncoding.cs
- unsafenativemethodsother.cs
- DateTimeConverter2.cs
- ScrollProviderWrapper.cs
- XamlParser.cs
- Graphics.cs
- StringToken.cs
- InputScope.cs
- CombinedGeometry.cs
- PlatformNotSupportedException.cs
- DataGridViewCellParsingEventArgs.cs
- CommonXSendMessage.cs
- ExtendedTransformFactory.cs
- ChtmlTextWriter.cs
- DataComponentGenerator.cs
- PartManifestEntry.cs
- TextServicesDisplayAttribute.cs
- BevelBitmapEffect.cs
- DeclaredTypeValidator.cs
- SafeHandles.cs
- KnownTypes.cs
- GC.cs
- TrustExchangeException.cs
- DoubleLinkList.cs
- WinEventHandler.cs
- XmlQueryTypeFactory.cs
- WebPartCollection.cs
- ProcessThread.cs
- TextDecorations.cs
- OutputCacheSection.cs
- DbConnectionStringCommon.cs
- LogManagementAsyncResult.cs
- UIElementHelper.cs
- DynamicMetaObjectBinder.cs
- DocumentViewerAutomationPeer.cs
- MappingMetadataHelper.cs
- DispatchWrapper.cs
- CompModSwitches.cs
- DataGridViewDataErrorEventArgs.cs
- ResourceReader.cs
- ConsoleCancelEventArgs.cs
- XmlEnumAttribute.cs
- ContentPathSegment.cs
- PerformanceCounterPermissionAttribute.cs
- OperatorExpressions.cs
- ToolStripDropDownMenu.cs
- HighlightComponent.cs
- PageSettings.cs
- WinFormsSecurity.cs
- EntityConnection.cs
- WebPartDescription.cs
- DataGridAutoFormatDialog.cs
- MediaSystem.cs
- DropDownList.cs
- EmbossBitmapEffect.cs
- DurableRuntimeValidator.cs
- FixedElement.cs