Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ElementAtQueryOperator.cs
- XmlElement.cs
- FormsAuthenticationModule.cs
- MatrixCamera.cs
- BreakRecordTable.cs
- MultilineStringConverter.cs
- VisualBasicSettingsHandler.cs
- ColumnMapTranslator.cs
- DataGridViewRowPostPaintEventArgs.cs
- KerberosSecurityTokenProvider.cs
- InternalMappingException.cs
- UnsafeNativeMethods.cs
- StylusPointProperty.cs
- UmAlQuraCalendar.cs
- StyleXamlParser.cs
- HttpRequestMessageProperty.cs
- FrameworkPropertyMetadata.cs
- DefaultValueTypeConverter.cs
- PartialClassGenerationTaskInternal.cs
- odbcmetadatacolumnnames.cs
- RangeBase.cs
- FlowLayoutPanel.cs
- ZoomPercentageConverter.cs
- DataGridPagerStyle.cs
- UnsafeNativeMethodsCLR.cs
- TdsRecordBufferSetter.cs
- HtmlShimManager.cs
- SspiHelper.cs
- _ChunkParse.cs
- AstNode.cs
- QuadraticBezierSegment.cs
- CommonXSendMessage.cs
- ReturnType.cs
- DashStyle.cs
- ValidationErrorCollection.cs
- Image.cs
- DirtyTextRange.cs
- HttpWriter.cs
- ImagingCache.cs
- XmlQualifiedName.cs
- PointAnimationClockResource.cs
- InkCanvasSelectionAdorner.cs
- MeshGeometry3D.cs
- OdbcInfoMessageEvent.cs
- GenericsInstances.cs
- Renderer.cs
- loginstatus.cs
- ComponentConverter.cs
- OdbcRowUpdatingEvent.cs
- WindowsImpersonationContext.cs
- RelationshipEndCollection.cs
- URI.cs
- Style.cs
- TreeNodeStyleCollectionEditor.cs
- WorkflowEnvironment.cs
- DataTablePropertyDescriptor.cs
- JsonReader.cs
- FocusManager.cs
- HtmlElementEventArgs.cs
- BamlTreeNode.cs
- Pens.cs
- WizardStepBase.cs
- ContextMenuService.cs
- PerfService.cs
- XmlSchemaAttributeGroupRef.cs
- Drawing.cs
- AsymmetricSignatureFormatter.cs
- MenuItemBindingCollection.cs
- CopyOnWriteList.cs
- ThreadStateException.cs
- InputLanguageManager.cs
- ActivityTrace.cs
- DictionaryMarkupSerializer.cs
- EventBuilder.cs
- EmptyEnumerator.cs
- TraceSection.cs
- SqlExpressionNullability.cs
- OdbcConnection.cs
- UserControlBuildProvider.cs
- MergablePropertyAttribute.cs
- IMembershipProvider.cs
- WorkflowQueueInfo.cs
- ColumnTypeConverter.cs
- MessageLogTraceRecord.cs
- BitStack.cs
- _TransmitFileOverlappedAsyncResult.cs
- HebrewCalendar.cs
- ResolveResponse.cs
- SecureStringHasher.cs
- ServicePointManagerElement.cs
- TypeValidationEventArgs.cs
- KnownTypesProvider.cs
- ReliableDuplexSessionChannel.cs
- GlobalizationAssembly.cs
- EndpointDiscoveryElement.cs
- DrawingContextWalker.cs
- GridViewCommandEventArgs.cs
- DeviceOverridableAttribute.cs
- SafeRightsManagementEnvironmentHandle.cs
- LinearGradientBrush.cs