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
- DataGridViewRowEventArgs.cs
- ProcessManager.cs
- SmtpFailedRecipientsException.cs
- PartialCachingAttribute.cs
- Debug.cs
- TypedTableHandler.cs
- DescendantBaseQuery.cs
- SafeSecurityHandles.cs
- RangeValidator.cs
- SiteOfOriginContainer.cs
- HijriCalendar.cs
- ProfileManager.cs
- VisualTreeUtils.cs
- _CommandStream.cs
- SiteMapSection.cs
- OleDbSchemaGuid.cs
- SafeThemeHandle.cs
- FixedSchema.cs
- StagingAreaInputItem.cs
- SwitchAttribute.cs
- UnsignedPublishLicense.cs
- ActivityExecutionFilter.cs
- ViewCellRelation.cs
- TokenBasedSet.cs
- MsmqBindingMonitor.cs
- DataServicePagingProviderWrapper.cs
- CanExpandCollapseAllConverter.cs
- TimelineClockCollection.cs
- StylusTip.cs
- SqlUtil.cs
- VerticalAlignConverter.cs
- SelectionPattern.cs
- TraceContext.cs
- StsCommunicationException.cs
- XomlCompilerResults.cs
- BamlTreeUpdater.cs
- DocumentOutline.cs
- TreeNodeSelectionProcessor.cs
- ApplicationTrust.cs
- SimpleBitVector32.cs
- SafeThreadHandle.cs
- RegistryConfigurationProvider.cs
- XPathScanner.cs
- SiteMapDataSource.cs
- TableLayoutCellPaintEventArgs.cs
- OperatingSystem.cs
- WpfXamlMember.cs
- FastPropertyAccessor.cs
- RectAnimationClockResource.cs
- AuthenticatingEventArgs.cs
- EntityContainerAssociationSet.cs
- AuthenticateEventArgs.cs
- SelectionRangeConverter.cs
- DodSequenceMerge.cs
- ReflectEventDescriptor.cs
- CustomWebEventKey.cs
- GrammarBuilderDictation.cs
- Schedule.cs
- BinHexEncoder.cs
- UnsafeNetInfoNativeMethods.cs
- WebControlAdapter.cs
- SmtpSection.cs
- SizeChangedEventArgs.cs
- GraphicsState.cs
- InputScopeNameConverter.cs
- InfoCardAsymmetricCrypto.cs
- SqlTriggerAttribute.cs
- UIntPtr.cs
- ASCIIEncoding.cs
- HashJoinQueryOperatorEnumerator.cs
- MediaContext.cs
- LayoutEditorPart.cs
- XmlILAnnotation.cs
- GroupByExpressionRewriter.cs
- ToolStripButton.cs
- XmlDataSourceDesigner.cs
- TextAnchor.cs
- RankException.cs
- EventProviderTraceListener.cs
- LicFileLicenseProvider.cs
- GuidelineSet.cs
- DesignerActionPanel.cs
- LinkedList.cs
- UnaryNode.cs
- webeventbuffer.cs
- ToolStripDropDown.cs
- SpeakProgressEventArgs.cs
- FrameAutomationPeer.cs
- ListViewCommandEventArgs.cs
- WebBrowserProgressChangedEventHandler.cs
- DataBinder.cs
- OutgoingWebResponseContext.cs
- LostFocusEventManager.cs
- StylusButtonEventArgs.cs
- EdmTypeAttribute.cs
- IgnoreFileBuildProvider.cs
- MimeParameterWriter.cs
- CategoryNameCollection.cs
- SafeArrayRankMismatchException.cs
- DataGridViewComboBoxColumn.cs