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
- FileNotFoundException.cs
- OdbcConnectionFactory.cs
- PassportIdentity.cs
- DeferredTextReference.cs
- TransactionOptions.cs
- SiteOfOriginContainer.cs
- DBConnection.cs
- SByte.cs
- MessagePropertyDescriptionCollection.cs
- EnumBuilder.cs
- WhiteSpaceTrimStringConverter.cs
- DependencyPropertyHelper.cs
- InteropBitmapSource.cs
- ListViewAutomationPeer.cs
- DBConcurrencyException.cs
- EntityKeyElement.cs
- Crypto.cs
- Rotation3DAnimationUsingKeyFrames.cs
- XmlSchemaAnnotated.cs
- IInstanceContextProvider.cs
- ListViewTableRow.cs
- CustomWebEventKey.cs
- SystemNetworkInterface.cs
- TrustManagerMoreInformation.cs
- DataGridViewCellLinkedList.cs
- DataGridViewButtonCell.cs
- NamedElement.cs
- DBBindings.cs
- TextWriter.cs
- ObjectDataSourceWizardForm.cs
- FileLogRecordEnumerator.cs
- ErrorFormatterPage.cs
- CookieHandler.cs
- DecoderFallback.cs
- ListenerChannelContext.cs
- SafeBitVector32.cs
- GridViewRowCollection.cs
- QueryCacheKey.cs
- PagesSection.cs
- EnumValidator.cs
- ButtonStandardAdapter.cs
- XmlBinaryWriterSession.cs
- WebControlParameterProxy.cs
- NumberFormatInfo.cs
- altserialization.cs
- ReaderOutput.cs
- TcpSocketManager.cs
- IgnoreFlushAndCloseStream.cs
- ConstructorNeedsTagAttribute.cs
- DockingAttribute.cs
- WindowsStatusBar.cs
- Inline.cs
- ZipIOExtraFieldElement.cs
- SpotLight.cs
- HttpCachePolicy.cs
- PrintingPermission.cs
- ActionFrame.cs
- ResXBuildProvider.cs
- DataTemplateKey.cs
- AuthenticationService.cs
- XmlWrappingReader.cs
- ReaderOutput.cs
- BindingsCollection.cs
- XmlSchemaValidationException.cs
- PanelStyle.cs
- OleDbParameter.cs
- GenericTextProperties.cs
- LongPath.cs
- RotateTransform.cs
- ActivationServices.cs
- ControlParameter.cs
- PrePrepareMethodAttribute.cs
- OSEnvironmentHelper.cs
- ExpandSegment.cs
- SemaphoreFullException.cs
- XmlSchemaSubstitutionGroup.cs
- BlockExpression.cs
- ProviderSettings.cs
- TextUtf8RawTextWriter.cs
- Boolean.cs
- TextEditorCharacters.cs
- ToolStripDropDownMenu.cs
- DeadCharTextComposition.cs
- DbProviderSpecificTypePropertyAttribute.cs
- CacheChildrenQuery.cs
- wmiprovider.cs
- TagPrefixCollection.cs
- BitmapDecoder.cs
- Internal.cs
- XmlBinaryReader.cs
- RegisteredHiddenField.cs
- SqlLiftWhereClauses.cs
- CustomErrorCollection.cs
- ExportException.cs
- AsymmetricAlgorithm.cs
- ObjectListCommand.cs
- CharStorage.cs
- QueryOperationResponseOfT.cs
- OptionalRstParameters.cs
- TreeNodeSelectionProcessor.cs