Example #1
0
 internal Serializer(
     Serializer parentSerializer,
     Session session, 
     bool isTopSerializer,
     Wrappers.WrappedSerializerNodeType reason)
 {
     this.m_serializerNodeType = reason;
     this.m_parentSerializer = parentSerializer;
     this.m_parentSession = session;
     this.m_bIsTopSerializer = isTopSerializer;
     if (this.m_bIsTopSerializer)
     {
         this.topDirectoryRecordErrorCountTable = new System.Collections.Hashtable();
         this.topDirectoryRecordWarningCountTable = new System.Collections.Hashtable();
     }
     else
     {
         this.topDirectoryRecordErrorCountTable = null;
         this.topDirectoryRecordWarningCountTable = null;
     }
 }
Example #2
0
 /// <summary>
 /// Factory method to create child-node for this parent-node.
 /// </summary>
 /// <param name="reason"></param>
 /// <returns>child-node</returns>
 public Wrappers.ISerializationTarget CreateChildSerializationTarget(
     Wrappers.WrappedSerializerNodeType reason)
 {
     if (!this.m_bIsTopSerializer)
     {
         throw new System.ApplicationException(
             string.Concat(
             "Is is not possible to create child-documents nested deeper than one-level, ",
             "due to limitations in the target file naming-scheme."));
     }
     //
     // Create child-serializer for the same (parent)-session.
     //
     Serializer childSerializer =
         new Serializer(this, this.m_parentSession, false, reason);
     childSerializer.m_targetFileName = this.m_targetFileName;
     //
     // Register child-serializer in child-collection of this parent-serializer.
     //
     this.m_childSerializers.Add(childSerializer);
     childSerializer.Init(
         this.m_childSerializers.IndexOf(childSerializer),
         reason);
     return childSerializer;
 }
Example #3
0
 /// <summary>
 /// Start the gathering of validation results output.
 /// </summary>
 /// <param name="fileName">The location of the file where you want to save.</param>
 public void StartResultsGathering(string fileName)
 {
     //
     // Setup call-back interfaces for ;
     // - serialization
     // - counting
     // - activity reporting.
     //
     this.m_topSerializer = new Serializer(null, this, true, Wrappers.WrappedSerializerNodeType.TopParent);
     this.m_topCountManager = new CountManager(this);
     this.m_activityReporter = new ActivityReporter(this);
     //
     // Couple into adapter layer between unmanaged and managed code.
     //
     this.m_MBaseSession.InitTopSerializationAndCountingAndActivityReportingTargets(
         this.m_topSerializer, this.m_topCountManager, this.m_activityReporter);
     this.m_topSerializer.StartTopSerializer(fileName);
     this.m_topCountManager.SerializeEnabled = true;
 }