Ejemplo n.º 1
0
 public void SetJavascriptCallbackProperty(JavascriptCallbackResponseMessageProperty javascriptResponseMessageProperty)
 {
     if (this.javascriptWrapper == null)
     {
         this.javascriptWrapper = new JavascriptXmlWriterWrapper(this.messageEncoder.writeEncoding)
         {
             JavascriptResponseMessageProperty = javascriptResponseMessageProperty
         };
     }
     else
     {
         this.javascriptWrapper.JavascriptResponseMessageProperty = javascriptResponseMessageProperty;
     }
 }
Ejemplo n.º 2
0
                protected override void ReturnXmlWriter(XmlDictionaryWriter writer)
                {
                    writer.Close();

                    if (writer is JavascriptXmlWriterWrapper)
                    {
                        if (this.javascriptWrapper == null)
                        {
                            this.javascriptWrapper = (JavascriptXmlWriterWrapper)writer;
                            this.javascriptWrapper.JavascriptResponseMessageProperty = null;
                            writer = this.javascriptWrapper.XmlJsonWriter;
                        }
                    }

                    if (this.returnedWriter == null)
                    {
                        this.returnedWriter = writer;
                    }
                }
Ejemplo n.º 3
0
                protected override XmlDictionaryWriter TakeXmlWriter(Stream stream)
                {
                    XmlDictionaryWriter writer = null;

                    if (this.returnedWriter == null)
                    {
                        writer = JsonReaderWriterFactory.CreateJsonWriter(stream, messageEncoder.writeEncoding, false);
                    }
                    else
                    {
                        writer = this.returnedWriter;
                        ((IXmlJsonWriterInitializer)writer).SetOutput(stream, messageEncoder.writeEncoding, false);
                        this.returnedWriter = null;
                    }

                    if (this.javascriptWrapper != null && this.javascriptWrapper.JavascriptResponseMessageProperty != null)
                    {
                        this.javascriptWrapper.SetOutput(stream, writer);
                        writer = this.javascriptWrapper;
                        this.javascriptWrapper = null;
                    }

                    return(writer);
                }
                protected override XmlDictionaryWriter TakeXmlWriter(Stream stream)
                {
                    XmlDictionaryWriter writer = null;
                    if (this.returnedWriter == null)
                    {
                        writer = JsonReaderWriterFactory.CreateJsonWriter(stream, messageEncoder.writeEncoding, false);
                    }
                    else
                    {
                        writer = this.returnedWriter;
                        ((IXmlJsonWriterInitializer)writer).SetOutput(stream, messageEncoder.writeEncoding, false);
                        this.returnedWriter = null;
                    }

                    if (this.javascriptWrapper != null && this.javascriptWrapper.JavascriptResponseMessageProperty != null)
                    {
                        this.javascriptWrapper.SetOutput(stream, writer);
                        writer = this.javascriptWrapper;
                        this.javascriptWrapper = null;
                    }

                    return writer;
                }
                protected override void ReturnXmlWriter(XmlDictionaryWriter writer)
                {
                    writer.Close();

                    if (writer is JavascriptXmlWriterWrapper)
                    {
                        if (this.javascriptWrapper == null)
                        {
                            this.javascriptWrapper = (JavascriptXmlWriterWrapper)writer;
                            this.javascriptWrapper.JavascriptResponseMessageProperty = null;
                            writer = this.javascriptWrapper.XmlJsonWriter;
                        }
                    }

                    if (this.returnedWriter == null)
                    {
                        this.returnedWriter = writer;
                    }
                }
 public void SetJavascriptCallbackProperty(JavascriptCallbackResponseMessageProperty javascriptResponseMessageProperty)
 {
     if (this.javascriptWrapper == null)
     {
         this.javascriptWrapper = new JavascriptXmlWriterWrapper(this.messageEncoder.writeEncoding)
         {
             JavascriptResponseMessageProperty = javascriptResponseMessageProperty
         };
     }
     else
     {
         this.javascriptWrapper.JavascriptResponseMessageProperty = javascriptResponseMessageProperty;
     }
 }