Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Services / Web / System / Web / Services / Description / MimeFormatExtensions.cs / 1305376 / MimeFormatExtensions.cs
namespace System.Web.Services.Description { using System.Xml.Serialization; using System.Collections; using System.ComponentModel; using System.Web.Services.Configuration; using System.Globalization; ///[XmlFormatExtension("content", MimeContentBinding.Namespace, typeof(MimePart), typeof(InputBinding), typeof(OutputBinding))] [XmlFormatExtensionPrefix("mime", MimeContentBinding.Namespace)] public sealed class MimeContentBinding : ServiceDescriptionFormatExtension { string type; string part; /// [XmlAttribute("part")] public string Part { get { return part; } set { part = value; } } /// [XmlAttribute("type")] public string Type { get { return type == null ? string.Empty : type; } set { type = value; } } /// public const string Namespace="http://schemas.xmlsoap.org/wsdl/mime/"; } /// [XmlFormatExtensionPoint("Extensions")] public sealed class MimePart : ServiceDescriptionFormatExtension { ServiceDescriptionFormatExtensionCollection extensions; /// [XmlIgnore] public ServiceDescriptionFormatExtensionCollection Extensions { get { if (extensions == null) extensions = new ServiceDescriptionFormatExtensionCollection(this); return extensions; } } } /// [XmlFormatExtension("multipartRelated", MimeContentBinding.Namespace, typeof(InputBinding), typeof(OutputBinding))] public sealed class MimeMultipartRelatedBinding : ServiceDescriptionFormatExtension { MimePartCollection parts = new MimePartCollection(); /// [XmlElement("part")] public MimePartCollection Parts { get { return parts; } } } /// [XmlFormatExtension("mimeXml", MimeContentBinding.Namespace, typeof(MimePart), typeof(InputBinding), typeof(OutputBinding))] public sealed class MimeXmlBinding : ServiceDescriptionFormatExtension { string part; /// [XmlAttribute("part")] public string Part { get { return part; } set { part = value; } } } /// public sealed class MimePartCollection : CollectionBase { /// public MimePart this[int index] { get { return (MimePart)List[index]; } set { List[index] = value; } } /// public int Add(MimePart mimePart) { return List.Add(mimePart); } /// public void Insert(int index, MimePart mimePart) { List.Insert(index, mimePart); } /// public int IndexOf(MimePart mimePart) { return List.IndexOf(mimePart); } /// public bool Contains(MimePart mimePart) { return List.Contains(mimePart); } /// public void Remove(MimePart mimePart) { List.Remove(mimePart); } /// public void CopyTo(MimePart[] array, int index) { List.CopyTo(array, index); } } /// [XmlFormatExtension("text", MimeTextBinding.Namespace, typeof(InputBinding), typeof(OutputBinding), typeof(MimePart))] [XmlFormatExtensionPrefix("tm", MimeTextBinding.Namespace)] public sealed class MimeTextBinding : ServiceDescriptionFormatExtension { MimeTextMatchCollection matches = new MimeTextMatchCollection(); /// public const string Namespace = "http://microsoft.com/wsdl/mime/textMatching/"; /// [XmlElement("match", typeof(MimeTextMatch))] public MimeTextMatchCollection Matches { get { return matches; } } } /// public sealed class MimeTextMatch { string name; string type; int repeats = 1; string pattern; int group = 1; int capture = 0; bool ignoreCase = false; MimeTextMatchCollection matches = new MimeTextMatchCollection(); /// [XmlAttribute("name")] public string Name { get { return name == null ? string.Empty : name; } set { name = value; } } /// [XmlAttribute("type")] public string Type { get { return type == null ? string.Empty : type; } set { type = value; } } /// [XmlAttribute("group"), DefaultValue(1)] public int Group { get { return group; } set { if (value < 0) throw new ArgumentException(Res.GetString(Res.WebNegativeValue, "group")); group = value; } } /// [XmlAttribute("capture"), DefaultValue(0)] public int Capture { get { return capture; } set { if (value < 0) throw new ArgumentException(Res.GetString(Res.WebNegativeValue, "capture")); capture = value; } } /// [XmlIgnore()] public int Repeats { get { return repeats; } set { if (value < 0) throw new ArgumentException(Res.GetString(Res.WebNegativeValue, "repeats")); repeats = value; } } /// [XmlAttribute("repeats"), DefaultValue("1")] public string RepeatsString { get { return repeats == int.MaxValue ? "*" : repeats.ToString(CultureInfo.InvariantCulture); } set { if (value == "*") repeats = int.MaxValue; else Repeats = int.Parse(value, CultureInfo.InvariantCulture); // pass through our setter for arg checking } } /// [XmlAttribute("pattern")] public string Pattern { get { return pattern == null ? string.Empty : pattern; } set { this.pattern = value; } } /// [XmlAttribute("ignoreCase")] public bool IgnoreCase { get { return ignoreCase; } set { ignoreCase = value; } } /// [XmlElement("match")] public MimeTextMatchCollection Matches { get { return matches; } } } /// public sealed class MimeTextMatchCollection : CollectionBase { /// public MimeTextMatch this[int index] { get { return (MimeTextMatch)List[index]; } set { List[index] = value; } } /// public int Add(MimeTextMatch match) { return List.Add(match); } /// public void Insert(int index, MimeTextMatch match) { List.Insert(index, match); } /// public int IndexOf(MimeTextMatch match) { return List.IndexOf(match); } /// public bool Contains(MimeTextMatch match) { return List.Contains(match); } /// public void Remove(MimeTextMatch match) { List.Remove(match); } /// public void CopyTo(MimeTextMatch[] array, int index) { List.CopyTo(array, index); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Web.Services.Description { using System.Xml.Serialization; using System.Collections; using System.ComponentModel; using System.Web.Services.Configuration; using System.Globalization; /// [XmlFormatExtension("content", MimeContentBinding.Namespace, typeof(MimePart), typeof(InputBinding), typeof(OutputBinding))] [XmlFormatExtensionPrefix("mime", MimeContentBinding.Namespace)] public sealed class MimeContentBinding : ServiceDescriptionFormatExtension { string type; string part; /// [XmlAttribute("part")] public string Part { get { return part; } set { part = value; } } /// [XmlAttribute("type")] public string Type { get { return type == null ? string.Empty : type; } set { type = value; } } /// public const string Namespace="http://schemas.xmlsoap.org/wsdl/mime/"; } /// [XmlFormatExtensionPoint("Extensions")] public sealed class MimePart : ServiceDescriptionFormatExtension { ServiceDescriptionFormatExtensionCollection extensions; /// [XmlIgnore] public ServiceDescriptionFormatExtensionCollection Extensions { get { if (extensions == null) extensions = new ServiceDescriptionFormatExtensionCollection(this); return extensions; } } } /// [XmlFormatExtension("multipartRelated", MimeContentBinding.Namespace, typeof(InputBinding), typeof(OutputBinding))] public sealed class MimeMultipartRelatedBinding : ServiceDescriptionFormatExtension { MimePartCollection parts = new MimePartCollection(); /// [XmlElement("part")] public MimePartCollection Parts { get { return parts; } } } /// [XmlFormatExtension("mimeXml", MimeContentBinding.Namespace, typeof(MimePart), typeof(InputBinding), typeof(OutputBinding))] public sealed class MimeXmlBinding : ServiceDescriptionFormatExtension { string part; /// [XmlAttribute("part")] public string Part { get { return part; } set { part = value; } } } /// public sealed class MimePartCollection : CollectionBase { /// public MimePart this[int index] { get { return (MimePart)List[index]; } set { List[index] = value; } } /// public int Add(MimePart mimePart) { return List.Add(mimePart); } /// public void Insert(int index, MimePart mimePart) { List.Insert(index, mimePart); } /// public int IndexOf(MimePart mimePart) { return List.IndexOf(mimePart); } /// public bool Contains(MimePart mimePart) { return List.Contains(mimePart); } /// public void Remove(MimePart mimePart) { List.Remove(mimePart); } /// public void CopyTo(MimePart[] array, int index) { List.CopyTo(array, index); } } /// [XmlFormatExtension("text", MimeTextBinding.Namespace, typeof(InputBinding), typeof(OutputBinding), typeof(MimePart))] [XmlFormatExtensionPrefix("tm", MimeTextBinding.Namespace)] public sealed class MimeTextBinding : ServiceDescriptionFormatExtension { MimeTextMatchCollection matches = new MimeTextMatchCollection(); /// public const string Namespace = "http://microsoft.com/wsdl/mime/textMatching/"; /// [XmlElement("match", typeof(MimeTextMatch))] public MimeTextMatchCollection Matches { get { return matches; } } } /// public sealed class MimeTextMatch { string name; string type; int repeats = 1; string pattern; int group = 1; int capture = 0; bool ignoreCase = false; MimeTextMatchCollection matches = new MimeTextMatchCollection(); /// [XmlAttribute("name")] public string Name { get { return name == null ? string.Empty : name; } set { name = value; } } /// [XmlAttribute("type")] public string Type { get { return type == null ? string.Empty : type; } set { type = value; } } /// [XmlAttribute("group"), DefaultValue(1)] public int Group { get { return group; } set { if (value < 0) throw new ArgumentException(Res.GetString(Res.WebNegativeValue, "group")); group = value; } } /// [XmlAttribute("capture"), DefaultValue(0)] public int Capture { get { return capture; } set { if (value < 0) throw new ArgumentException(Res.GetString(Res.WebNegativeValue, "capture")); capture = value; } } /// [XmlIgnore()] public int Repeats { get { return repeats; } set { if (value < 0) throw new ArgumentException(Res.GetString(Res.WebNegativeValue, "repeats")); repeats = value; } } /// [XmlAttribute("repeats"), DefaultValue("1")] public string RepeatsString { get { return repeats == int.MaxValue ? "*" : repeats.ToString(CultureInfo.InvariantCulture); } set { if (value == "*") repeats = int.MaxValue; else Repeats = int.Parse(value, CultureInfo.InvariantCulture); // pass through our setter for arg checking } } /// [XmlAttribute("pattern")] public string Pattern { get { return pattern == null ? string.Empty : pattern; } set { this.pattern = value; } } /// [XmlAttribute("ignoreCase")] public bool IgnoreCase { get { return ignoreCase; } set { ignoreCase = value; } } /// [XmlElement("match")] public MimeTextMatchCollection Matches { get { return matches; } } } /// public sealed class MimeTextMatchCollection : CollectionBase { /// public MimeTextMatch this[int index] { get { return (MimeTextMatch)List[index]; } set { List[index] = value; } } /// public int Add(MimeTextMatch match) { return List.Add(match); } /// public void Insert(int index, MimeTextMatch match) { List.Insert(index, match); } /// public int IndexOf(MimeTextMatch match) { return List.IndexOf(match); } /// public bool Contains(MimeTextMatch match) { return List.Contains(match); } /// public void Remove(MimeTextMatch match) { List.Remove(match); } /// public void CopyTo(MimeTextMatch[] array, int index) { List.CopyTo(array, index); } } } // 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
- DataControlHelper.cs
- CacheForPrimitiveTypes.cs
- ColorBlend.cs
- ThreadInterruptedException.cs
- ExtenderProviderService.cs
- ConnectionInterfaceCollection.cs
- ControlPropertyNameConverter.cs
- XmlSerializer.cs
- TrailingSpaceComparer.cs
- DecoderFallback.cs
- DatePickerTextBox.cs
- DbConnectionStringCommon.cs
- CharEnumerator.cs
- HandlerBase.cs
- AutoCompleteStringCollection.cs
- Interop.cs
- Exceptions.cs
- XmlChoiceIdentifierAttribute.cs
- MbpInfo.cs
- OrderablePartitioner.cs
- UrlAuthFailureHandler.cs
- ConditionCollection.cs
- DesignerCategoryAttribute.cs
- TransactionManager.cs
- PermissionAttributes.cs
- HtmlHistory.cs
- sqlcontext.cs
- CellParagraph.cs
- MaskedTextBox.cs
- DefaultTextStore.cs
- TableColumnCollectionInternal.cs
- DataGridViewDataConnection.cs
- SQLDateTime.cs
- InstanceKeyCompleteException.cs
- PermissionSetTriple.cs
- EventRoute.cs
- RenderingEventArgs.cs
- UnsafeMethods.cs
- DesignTimeValidationFeature.cs
- DateTimeOffset.cs
- NetCodeGroup.cs
- ByteRangeDownloader.cs
- ScrollBarRenderer.cs
- ClientUIRequest.cs
- RuntimeHandles.cs
- NamespaceDisplay.xaml.cs
- TypedDataSetSchemaImporterExtension.cs
- ColorTranslator.cs
- PresentationTraceSources.cs
- HexParser.cs
- SR.cs
- FileReader.cs
- IssuanceTokenProviderBase.cs
- GridView.cs
- CompositeActivityMarkupSerializer.cs
- ParseChildrenAsPropertiesAttribute.cs
- Byte.cs
- ButtonBase.cs
- NullExtension.cs
- XmlSchemas.cs
- ActiveXSite.cs
- QilReplaceVisitor.cs
- Vars.cs
- ObjectDataSource.cs
- FindCompletedEventArgs.cs
- DictionarySectionHandler.cs
- RegistrySecurity.cs
- Grant.cs
- TargetConverter.cs
- EventLogInformation.cs
- CodeThrowExceptionStatement.cs
- WebPartConnectionsCancelEventArgs.cs
- MetadataItemCollectionFactory.cs
- PropertySet.cs
- ScriptingScriptResourceHandlerSection.cs
- InteropAutomationProvider.cs
- NavigationPropertyEmitter.cs
- GPStream.cs
- ModelPropertyDescriptor.cs
- SingleKeyFrameCollection.cs
- ValuePatternIdentifiers.cs
- XPathScanner.cs
- FloatAverageAggregationOperator.cs
- InvokeBase.cs
- XmlUrlEditor.cs
- SwitchLevelAttribute.cs
- Single.cs
- _TLSstream.cs
- XmlDocumentFragment.cs
- DesignerImageAdapter.cs
- QilNode.cs
- SafeNativeMethods.cs
- LoadRetryHandler.cs
- ServiceHttpHandlerFactory.cs
- Hex.cs
- MD5CryptoServiceProvider.cs
- RequestDescription.cs
- XamlSerializerUtil.cs
- MailBnfHelper.cs
- ThousandthOfEmRealDoubles.cs