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
- SwitchLevelAttribute.cs
- DbExpressionRules.cs
- SQLBoolean.cs
- Thumb.cs
- Site.cs
- AnnotationService.cs
- NullRuntimeConfig.cs
- RightsManagementEncryptedStream.cs
- VisualStates.cs
- METAHEADER.cs
- DataServiceQueryProvider.cs
- DesignerActionPanel.cs
- NewItemsContextMenuStrip.cs
- IODescriptionAttribute.cs
- NotSupportedException.cs
- PropertyInformationCollection.cs
- SecurityUtils.cs
- StackOverflowException.cs
- SubMenuStyleCollection.cs
- FixedStringLookup.cs
- Evidence.cs
- BamlVersionHeader.cs
- hresults.cs
- SqlFactory.cs
- TreeNodeCollection.cs
- MetadataCache.cs
- BCryptHashAlgorithm.cs
- AdRotator.cs
- _Events.cs
- RsaSecurityTokenAuthenticator.cs
- XmlStrings.cs
- EastAsianLunisolarCalendar.cs
- SmtpDateTime.cs
- UnrecognizedAssertionsBindingElement.cs
- FixedPageProcessor.cs
- CompiledRegexRunnerFactory.cs
- StylusButton.cs
- recordstatefactory.cs
- ComplexTypeEmitter.cs
- ThreadAttributes.cs
- ListViewInsertionMark.cs
- DrawTreeNodeEventArgs.cs
- DirtyTextRange.cs
- TextBoxAutoCompleteSourceConverter.cs
- InputChannelAcceptor.cs
- CategoryNameCollection.cs
- SqlDataSourceConfigureSortForm.cs
- XmlTextReaderImpl.cs
- KnownTypesProvider.cs
- ObjectAnimationBase.cs
- TdsParserSafeHandles.cs
- DataControlCommands.cs
- InvalidProgramException.cs
- DataTemplateKey.cs
- SiteMapNodeCollection.cs
- ObjectNavigationPropertyMapping.cs
- cookiecollection.cs
- Classification.cs
- TextSelection.cs
- CounterCreationDataCollection.cs
- PathBox.cs
- AddInBase.cs
- PropertyGridDesigner.cs
- DataBinding.cs
- ModelToObjectValueConverter.cs
- TargetPerspective.cs
- ScrollBarAutomationPeer.cs
- WarningException.cs
- Configuration.cs
- TextReader.cs
- ContextMarshalException.cs
- BitmapFrame.cs
- LineBreakRecord.cs
- AsyncOperationManager.cs
- ColorAnimationUsingKeyFrames.cs
- ActivationServices.cs
- WebPartsSection.cs
- ListViewInsertionMark.cs
- Function.cs
- SharedDp.cs
- DataServiceSaveChangesEventArgs.cs
- XmlSchemaAttributeGroupRef.cs
- SoapAttributeAttribute.cs
- XmlUtilWriter.cs
- QueryCacheKey.cs
- HtmlSelectionListAdapter.cs
- ListViewDeleteEventArgs.cs
- ThreadExceptionDialog.cs
- SessionEndingEventArgs.cs
- LockedBorderGlyph.cs
- XsltException.cs
- DataGridViewColumnEventArgs.cs
- FactoryId.cs
- xsdvalidator.cs
- SoapConverter.cs
- Int32Animation.cs
- ReferencedType.cs
- Listener.cs
- RemotingException.cs
- BitSet.cs