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
- Thread.cs
- WindowsStatusBar.cs
- PersonalizablePropertyEntry.cs
- InternalConfigConfigurationFactory.cs
- SoapFormatter.cs
- SqlGatherProducedAliases.cs
- FormattedTextSymbols.cs
- ObjectTag.cs
- TdsRecordBufferSetter.cs
- WindowPattern.cs
- ForeignConstraint.cs
- EmptyControlCollection.cs
- InstanceKey.cs
- ObjectDataSourceDisposingEventArgs.cs
- DataViewSetting.cs
- XamlFigureLengthSerializer.cs
- EditingContext.cs
- SearchForVirtualItemEventArgs.cs
- Listener.cs
- ObjectDataProvider.cs
- XhtmlBasicPageAdapter.cs
- PassportAuthentication.cs
- DbSourceCommand.cs
- TimeoutException.cs
- ListenerSingletonConnectionReader.cs
- UriTemplateTable.cs
- FormViewPagerRow.cs
- wmiprovider.cs
- ThreadExceptionEvent.cs
- ISCIIEncoding.cs
- TypeToStringValueConverter.cs
- FieldReference.cs
- ToolZone.cs
- BitmapEffectGeneralTransform.cs
- ServicesExceptionNotHandledEventArgs.cs
- DecoderNLS.cs
- CultureSpecificCharacterBufferRange.cs
- DiagnosticTraceSource.cs
- ManagedFilter.cs
- ClientTarget.cs
- SystemSounds.cs
- GlobalDataBindingHandler.cs
- SystemPens.cs
- ConfigXmlText.cs
- TableHeaderCell.cs
- WebPartDisplayMode.cs
- Parser.cs
- UnmanagedMarshal.cs
- CollaborationHelperFunctions.cs
- CompilationLock.cs
- WindowsScrollBarBits.cs
- GenericAuthenticationEventArgs.cs
- ReadOnlyDataSource.cs
- SolidColorBrush.cs
- Sentence.cs
- WebPartManagerDesigner.cs
- ConditionBrowserDialog.cs
- hresults.cs
- DialogResultConverter.cs
- URLString.cs
- ZipIOModeEnforcingStream.cs
- TextLine.cs
- MemoryStream.cs
- WebPartDeleteVerb.cs
- DispatcherObject.cs
- EntityDesignerDataSourceView.cs
- ImageBrush.cs
- FacetEnabledSchemaElement.cs
- WizardPanel.cs
- Shape.cs
- CultureInfoConverter.cs
- SafeMILHandle.cs
- ObjectCloneHelper.cs
- ValidatorUtils.cs
- FlowLayoutPanel.cs
- TypeUsageBuilder.cs
- JoinElimination.cs
- PasswordDeriveBytes.cs
- WpfPayload.cs
- ArrayItemReference.cs
- CrossContextChannel.cs
- SymbolType.cs
- ThaiBuddhistCalendar.cs
- DbCommandDefinition.cs
- log.cs
- WorkflowServiceAttributesTypeConverter.cs
- FontUnit.cs
- DataTemplateSelector.cs
- CodeDOMUtility.cs
- MetadataWorkspace.cs
- FontStyle.cs
- Mutex.cs
- PerformanceCounterPermissionEntry.cs
- ImmutablePropertyDescriptorGridEntry.cs
- SessionEndingCancelEventArgs.cs
- UnmanagedMemoryStreamWrapper.cs
- ArrayWithOffset.cs
- BooleanFunctions.cs
- List.cs
- TextOnlyOutput.cs