internal SerializationTrace(SerializationContextBase context, string elementName, bool isArray, Stream stream) { this.context = context; this.elementName = elementName; this.isArray = isArray; this.stream = stream; #if TRACESERIALIZATION || TRACESTATS this.context.trace.Indent(); #endif this.startStreamPosition = stream != null ? (int)stream.Position : 0; #if DEBUG && TRACESERIALIZATION this.context.trace.WriteLine("Serialization: {2,7} {0}{1}", elementName, isArray ? "[]" : string.Empty, stream.Position); #endif }
internal SerializationTrace(SerializationContextBase context, string elementName, bool isArray, Stream stream) { this.context = context; this.elementName = elementName; this.isArray = isArray; this.stream = stream; this.context.indentationLevel++; this.startStreamPosition = stream != null ? (int)stream.Position : 0; #if DEBUG && TRACESERIALIZATION for (int i = 0; i < this.context.indentationLevel; i++) { Debug.Write(Indent); } Debug.WriteLine("Serialization: {2,7} {0}{1}", elementName, isArray ? "[]" : string.Empty, stream.Position); #endif }