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;
        }
Beispiel #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);
        }
Beispiel #3
0
 void GenerateCode(MimeTextReturn importedReturn, CodeGenerationOptions options)
 {
     GenerateCode(importedReturn.TypeName, importedReturn.TextBinding.Matches, options);
 }
Beispiel #4
0
 void GenerateCode(MimeTextReturn importedReturn)
 {
     GenerateCode(importedReturn.TypeName, importedReturn.TextBinding.Matches);
 }
 private void GenerateCode(MimeTextReturn importedReturn, CodeGenerationOptions options)
 {
     this.GenerateCode(importedReturn.TypeName, importedReturn.TextBinding.Matches, options);
 }