本文整理汇总了C#中OnXmlDictionaryReaderClose类的典型用法代码示例。如果您正苦于以下问题:C# OnXmlDictionaryReaderClose类的具体用法?C# OnXmlDictionaryReaderClose怎么用?C# OnXmlDictionaryReaderClose使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OnXmlDictionaryReaderClose类属于命名空间,在下文中一共展示了OnXmlDictionaryReaderClose类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SetInput
public void SetInput(Stream stream, Encoding[] encodings, string contentType, XmlDictionaryReaderQuotas quotas, int maxBufferSize, OnXmlDictionaryReaderClose onClose)
{
SetReadEncodings(encodings);
CheckContentType(contentType);
Initialize(stream, contentType, quotas, maxBufferSize);
this.onClose = onClose;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:XmlMtomReader.cs
示例2: MoveToInitial
private void MoveToInitial(XmlDictionaryReaderQuotas quotas, XmlBinaryReaderSession session, OnXmlDictionaryReaderClose onClose)
{
MoveToInitial(quotas);
_maxBytesPerRead = quotas.MaxBytesPerRead;
_arrayState = ArrayState.None;
_isTextWithEndElement = false;
}
开发者ID:dotnet,项目名称:corefx,代码行数:7,代码来源:XmlBinaryReader.cs
示例3: MtomMessageEncoder
public MtomMessageEncoder(System.ServiceModel.Channels.MessageVersion version, Encoding writeEncoding, int maxReadPoolSize, int maxWritePoolSize, int maxBufferSize, XmlDictionaryReaderQuotas quotas)
{
if (version == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("version");
}
if (writeEncoding == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("writeEncoding");
}
TextEncoderDefaults.ValidateEncoding(writeEncoding);
this.writeEncoding = writeEncoding;
this.maxReadPoolSize = maxReadPoolSize;
this.maxWritePoolSize = maxWritePoolSize;
this.readerQuotas = new XmlDictionaryReaderQuotas();
quotas.CopyTo(this.readerQuotas);
this.maxBufferSize = maxBufferSize;
this.onStreamedReaderClose = new OnXmlDictionaryReaderClose(this.ReturnStreamedReader);
this.thisLock = new object();
if (version.Envelope == EnvelopeVersion.Soap12)
{
this.contentEncodingMap = TextMessageEncoderFactory.Soap12Content;
}
else
{
if (version.Envelope != EnvelopeVersion.Soap11)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "Invalid MessageVersion", new object[0])));
}
this.contentEncodingMap = TextMessageEncoderFactory.Soap11Content;
}
this.version = version;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:33,代码来源:MtomMessageEncoder.cs
示例4: CreateBinaryReader
public static XmlDictionaryReader CreateBinaryReader(byte[] buffer, int offset, int count,
IXmlDictionary dictionary,
XmlDictionaryReaderQuotas quotas,
XmlBinaryReaderSession session,
OnXmlDictionaryReaderClose onClose)
{
XmlBinaryReader reader = new XmlBinaryReader();
reader.SetInput(buffer, offset, count, dictionary, quotas, session, onClose);
return reader;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:10,代码来源:XmlDictionaryReader.cs
示例5: XmlSimpleDictionaryReader
public XmlSimpleDictionaryReader (XmlReader reader,
XmlDictionary dictionary, OnXmlDictionaryReaderClose onClose)
{
this.reader = reader;
this.onClose = onClose;
as_line_info = reader as IXmlLineInfo;
as_dict_reader = reader as XmlDictionaryReader;
if (dictionary == null)
dictionary = new XmlDictionary ();
dict = dictionary;
}
开发者ID:nlhepler,项目名称:mono,代码行数:12,代码来源:XmlSimpleDictionaryReader.cs
示例6: SetInput
public void SetInput(Stream stream,
IXmlDictionary dictionary,
XmlDictionaryReaderQuotas quotas,
XmlBinaryReaderSession session,
OnXmlDictionaryReaderClose onClose)
{
if (stream == null)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(stream));
MoveToInitial(quotas, session, null);
BufferReader.SetBuffer(stream, dictionary, session);
_buffered = false;
}
开发者ID:dotnet,项目名称:corefx,代码行数:12,代码来源:XmlBinaryReader.cs
示例7: XmlMtomDictionaryReader
public XmlMtomDictionaryReader (
Stream stream, Encoding [] encodings, string contentType,
XmlDictionaryReaderQuotas quotas,
int maxBufferSize,
OnXmlDictionaryReaderClose onClose)
{
this.stream = stream;
this.encodings = encodings;
content_type = contentType != null ? CreateContentType (contentType) : null;
this.quotas = quotas;
this.max_buffer_size = maxBufferSize;
on_close = onClose;
Initialize ();
}
开发者ID:nlhepler,项目名称:mono,代码行数:15,代码来源:XmlMtomDictionaryReader.cs
示例8: BinaryMessageEncoderFactory
public BinaryMessageEncoderFactory(System.ServiceModel.Channels.MessageVersion messageVersion, int maxReadPoolSize, int maxWritePoolSize, int maxSessionSize, XmlDictionaryReaderQuotas readerQuotas, BinaryVersion version)
{
this.messageVersion = messageVersion;
this.messageEncoder = new BinaryMessageEncoder(this, false, 0);
this.maxReadPoolSize = maxReadPoolSize;
this.maxWritePoolSize = maxWritePoolSize;
this.maxSessionSize = maxSessionSize;
this.thisLock = new object();
this.onStreamedReaderClose = new OnXmlDictionaryReaderClose(this.ReturnStreamedReader);
this.readerQuotas = new XmlDictionaryReaderQuotas();
if (readerQuotas != null)
{
readerQuotas.CopyTo(this.readerQuotas);
}
this.binaryVersion = version;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:BinaryMessageEncoderFactory.cs
示例9: Close
public override void Close()
{
base.Close();
OnXmlDictionaryReaderClose onClose = this.onClose;
this.onClose = null;
if (onClose != null)
{
try
{
onClose(this);
}
catch (Exception exception)
{
if (Fx.IsFatal(exception))
{
throw;
}
throw DiagnosticUtility.ExceptionUtility.ThrowHelperCallback(exception);
}
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:21,代码来源:XmlBinaryReader.cs
示例10: BinaryMessageEncoderFactory
public BinaryMessageEncoderFactory(MessageVersion messageVersion, int maxReadPoolSize, int maxWritePoolSize, int maxSessionSize,
XmlDictionaryReaderQuotas readerQuotas, long maxReceivedMessageSize, BinaryVersion version, CompressionFormat compressionFormat)
{
this.messageVersion = messageVersion;
this.maxReadPoolSize = maxReadPoolSize;
this.maxWritePoolSize = maxWritePoolSize;
this.maxSessionSize = maxSessionSize;
this.thisLock = new object();
this.onStreamedReaderClose = new OnXmlDictionaryReaderClose(ReturnStreamedReader);
this.readerQuotas = new XmlDictionaryReaderQuotas();
if (readerQuotas != null)
{
readerQuotas.CopyTo(this.readerQuotas);
}
this.bufferedReadReaderQuotas = EncoderHelpers.GetBufferedReadQuotas(this.readerQuotas);
this.MaxReceivedMessageSize = maxReceivedMessageSize;
this.binaryVersion = version;
this.compressionFormat = compressionFormat;
this.messageEncoder = new BinaryMessageEncoder(this, false, 0);
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:22,代码来源:BinaryMessageEncoder.cs
示例11: CreateTextReader
static public XmlDictionaryReader CreateTextReader(Stream stream, Encoding encoding,
XmlDictionaryReaderQuotas quotas,
OnXmlDictionaryReaderClose onClose)
{
XmlUTF8TextReader reader = new XmlUTF8TextReader();
reader.SetInput(stream, encoding, quotas, onClose);
return reader;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:8,代码来源:XmlDictionaryReader.cs
示例12: Close
public override void Close()
{
_rowOffsets = null;
base.Close();
OnXmlDictionaryReaderClose onClose = _onClose;
_onClose = null;
if (onClose != null)
{
try
{
onClose(this);
}
catch (Exception e)
{
if (DiagnosticUtility.IsFatal(e)) throw;
throw DiagnosticUtility.ExceptionUtility.ThrowHelperCallback(e);
}
}
}
开发者ID:ChuangYang,项目名称:corefx,代码行数:20,代码来源:XmlUTF8TextReader.cs
示例13: MoveToInitial
private void MoveToInitial(XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
{
MoveToInitial(quotas);
_maxBytesPerRead = quotas.MaxBytesPerRead;
_onClose = onClose;
}
开发者ID:ChuangYang,项目名称:corefx,代码行数:6,代码来源:XmlUTF8TextReader.cs
示例14: SetInput
public void SetInput(Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
{
if (stream == null)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("stream");
MoveToInitial(quotas, onClose);
stream = new EncodingStreamWrapper(stream, encoding);
BufferReader.SetBuffer(stream, null, null);
_buffered = false;
}
开发者ID:ChuangYang,项目名称:corefx,代码行数:9,代码来源:XmlUTF8TextReader.cs
示例15: CreateJsonReader
public static XmlDictionaryReader CreateJsonReader (Stream source, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose readerClose)
{
return new JsonReader (source, encoding, quotas, readerClose);
}
开发者ID:nickchal,项目名称:pash,代码行数:4,代码来源:JsonReaderWriterFactory.cs
示例16: Dispose
protected override void Dispose(bool disposing)
{
OnXmlDictionaryReaderClose onClose = _onReaderClose;
_onReaderClose = null;
ResetState();
if (onClose != null)
{
try
{
onClose(this);
}
catch (Exception e)
{
if (DiagnosticUtility.IsFatal(e))
{
throw;
}
throw new Exception(SR.GenericCallbackException, e);
}
}
base.Dispose(disposing);
}
开发者ID:ChuangYang,项目名称:corefx,代码行数:23,代码来源:XmlJsonReader.cs
示例17: SetInput
public void SetInput(byte[] buffer, int offset, int count, Encoding encoding, XmlDictionaryReaderQuotas quotas,
OnXmlDictionaryReaderClose onClose)
{
if (buffer == null)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("buffer");
}
if (offset < 0)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
new ArgumentOutOfRangeException("offset", SR.GetString(SR.ValueMustBeNonNegative)));
}
if (offset > buffer.Length)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
new ArgumentOutOfRangeException("offset",
SR.GetString(SR.JsonOffsetExceedsBufferSize, buffer.Length)));
}
if (count < 0)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
new ArgumentOutOfRangeException("count", SR.GetString(SR.ValueMustBeNonNegative)));
}
if (count > buffer.Length - offset)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(
new ArgumentOutOfRangeException("count",
SR.GetString(SR.JsonSizeExceedsRemainingBufferSpace,
buffer.Length - offset)));
}
MoveToInitial(quotas, onClose);
ArraySegment<byte> seg = JsonEncodingStreamWrapper.ProcessBuffer(buffer, offset, count, encoding);
BufferReader.SetBuffer(seg.Array, seg.Offset, seg.Count, null, null);
this.buffered = true;
ResetState();
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:37,代码来源:XmlJsonReader.cs
示例18: SetInput
public void SetInput(Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas,
OnXmlDictionaryReaderClose onClose)
{
if (stream == null)
{
throw new ArgumentNullException(nameof(stream));
}
MoveToInitial(quotas, onClose);
stream = new JsonEncodingStreamWrapper(stream, encoding, true);
BufferReader.SetBuffer(stream, null, null);
_buffered = false;
ResetState();
}
开发者ID:ChuangYang,项目名称:corefx,代码行数:15,代码来源:XmlJsonReader.cs
示例19: MoveToInitial
void MoveToInitial(XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
{
MoveToInitial(quotas);
this.maxBytesPerRead = quotas.MaxBytesPerRead;
this.onReaderClose = onClose;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:6,代码来源:XmlJsonReader.cs
示例20: CreateMtomReader
static public XmlDictionaryReader CreateMtomReader(Stream stream, Encoding[] encodings, string contentType,
XmlDictionaryReaderQuotas quotas, int maxBufferSize, OnXmlDictionaryReaderClose onClose)
{
XmlMtomReader reader = new XmlMtomReader();
reader.SetInput(stream, encodings, contentType, quotas, maxBufferSize, onClose);
return reader;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:XmlDictionaryReader.cs
注:本文中的OnXmlDictionaryReaderClose类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论