Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Mail / LinkedResource.cs / 1305376 / 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
- DockingAttribute.cs
- KnownAssembliesSet.cs
- SmiSettersStream.cs
- PropertyConverter.cs
- RegexCharClass.cs
- OleCmdHelper.cs
- AutoSizeToolBoxItem.cs
- DataPagerField.cs
- TextPointerBase.cs
- KeyValuePairs.cs
- ListViewItem.cs
- ParameterDataSourceExpression.cs
- FileLogRecord.cs
- AnnotationResourceChangedEventArgs.cs
- LifetimeServices.cs
- PermissionRequestEvidence.cs
- FindRequestContext.cs
- BitSet.cs
- HMACSHA256.cs
- SelectionChangedEventArgs.cs
- ClientRuntimeConfig.cs
- ResourceManagerWrapper.cs
- XXXInfos.cs
- XamlBrushSerializer.cs
- NavigationCommands.cs
- OdbcErrorCollection.cs
- Console.cs
- SafeLocalAllocation.cs
- DesignerCategoryAttribute.cs
- documentsequencetextview.cs
- EUCJPEncoding.cs
- HttpCacheVaryByContentEncodings.cs
- FormatVersion.cs
- AstTree.cs
- ValidationRule.cs
- CodePrimitiveExpression.cs
- OutOfMemoryException.cs
- SecurityState.cs
- EventEntry.cs
- PEFileReader.cs
- SymbolType.cs
- BitVector32.cs
- ObjectDataSourceEventArgs.cs
- ResolveDuplexCD1AsyncResult.cs
- TableParaClient.cs
- CellQuery.cs
- TreeWalkHelper.cs
- DataGridViewComboBoxEditingControl.cs
- XmlSchemaComplexContentExtension.cs
- TextEditorThreadLocalStore.cs
- DotExpr.cs
- NativeCompoundFileAPIs.cs
- ImageSourceValueSerializer.cs
- IFlowDocumentViewer.cs
- Vector3DKeyFrameCollection.cs
- TypeCodeDomSerializer.cs
- ScriptingProfileServiceSection.cs
- MaterialGroup.cs
- ViewManager.cs
- SafeMarshalContext.cs
- ErrorRuntimeConfig.cs
- RecognizedPhrase.cs
- HotSpotCollection.cs
- DataPagerFieldItem.cs
- ListComponentEditor.cs
- IriParsingElement.cs
- SpellerInterop.cs
- WindowsHyperlink.cs
- TabControl.cs
- ListSourceHelper.cs
- BamlResourceSerializer.cs
- ResourceDefaultValueAttribute.cs
- SmtpReplyReader.cs
- GrammarBuilderRuleRef.cs
- MultiByteCodec.cs
- shaperfactoryquerycachekey.cs
- WebConfigurationFileMap.cs
- ImageAutomationPeer.cs
- ProcessHostFactoryHelper.cs
- ToolStripDropDown.cs
- OrderedDictionary.cs
- PersonalizationProviderHelper.cs
- WpfWebRequestHelper.cs
- WorkflowIdleElement.cs
- SafeIUnknown.cs
- GenericPrincipal.cs
- SmiConnection.cs
- ParserExtension.cs
- Facet.cs
- ByteViewer.cs
- CodeAttributeArgumentCollection.cs
- ZoneButton.cs
- DoubleAnimationBase.cs
- XmlSchemaExporter.cs
- PersonalizationProvider.cs
- SchemaComplexType.cs
- HttpRequest.cs
- Paragraph.cs
- BamlReader.cs
- TraceListener.cs