Exemple #1
0
        internal override MimeReturn ImportReturn()
        {
            MimeTextBinding binding = (MimeTextBinding)base.ImportContext.OperationBinding.Output.Extensions.Find(typeof(MimeTextBinding));

            if (binding == null)
            {
                return(null);
            }
            if (binding.Matches.Count == 0)
            {
                base.ImportContext.UnsupportedOperationBindingWarning(Res.GetString("MissingMatchElement0"));
                return(null);
            }
            this.methodName = CodeIdentifier.MakeValid(base.ImportContext.OperationBinding.Name);
            return(new MimeTextReturn {
                TypeName = base.ImportContext.ClassNames.AddUnique(this.methodName + "Matches", binding), TextBinding = binding, ReaderType = typeof(TextReturnReader)
            });
        }
Exemple #2
0
        internal override MimeReturn ImportReturn()
        {
            MimeTextBinding mimeTextBinding = (MimeTextBinding)ImportContext.OperationBinding.Output.Extensions.Find(typeof(MimeTextBinding));

            if (mimeTextBinding == null)
            {
                return(null);
            }
            if (mimeTextBinding.Matches.Count == 0)
            {
                ImportContext.UnsupportedOperationBindingWarning(Res.GetString(Res.MissingMatchElement0));
                return(null);
            }
            methodName = CodeIdentifier.MakeValid(ImportContext.OperationBinding.Name);

            MimeTextReturn importedReturn = new MimeTextReturn();

            importedReturn.TypeName    = ImportContext.ClassNames.AddUnique(methodName + "Matches", mimeTextBinding);
            importedReturn.TextBinding = mimeTextBinding;
            importedReturn.ReaderType  = typeof(TextReturnReader);
            return(importedReturn);
        }
 private void Write97_MimeTextBinding(string n, string ns, MimeTextBinding o, bool isNullable, bool needType)
 {
     if (o == null)
     {
         if (isNullable)
         {
             base.WriteNullTagLiteral(n, ns);
         }
     }
     else
     {
         if (!needType && !(o.GetType() == typeof(MimeTextBinding)))
         {
             throw base.CreateUnknownTypeException(o);
         }
         base.WriteStartElement(n, ns, o, false, null);
         if (needType)
         {
             base.WriteXsiType("MimeTextBinding", "http://microsoft.com/wsdl/mime/textMatching/");
         }
         if (o.Required)
         {
             base.WriteAttribute("required", "http://schemas.xmlsoap.org/wsdl/", XmlConvert.ToString(o.Required));
         }
         MimeTextMatchCollection matches = o.Matches;
         if (matches != null)
         {
             for (int i = 0; i < matches.Count; i++)
             {
                 this.Write96_MimeTextMatch("match", "http://microsoft.com/wsdl/mime/textMatching/", matches[i], false, false);
             }
         }
         base.WriteEndElement(o);
     }
 }