Example #1
0
 internal override void _OnAfterApiSerialize(object r, bool withClean)
 {
     if (r == null)
     {
         return;
     }
     if (this._Source != null)
     {
         if (this._Source._ClassName() == "Archive")
         {
             object s = withClean ? this._Source.ApiSerialize(true) : new System.Collections.Generic.Dictionary <string, object> {
                 { "ID", this._Source._Id() }
             };
             (r as System.Collections.Generic.Dictionary <string, object>)["SourceArchive"] = s;
         }
         else
         {
             if (this._Source._ClassName() == "Disk")
             {
                 object s = withClean ? this._Source.ApiSerialize(true) : new System.Collections.Generic.Dictionary <string, object> {
                     { "ID", this._Source._Id() }
                 };
                 (r as System.Collections.Generic.Dictionary <string, object>)["SourceDisk"] = s;
             }
             else
             {
                 this._Source = null;
                 Util.ValidateType(this._Source, "Disk or Archive", true);
             }
         }
     }
 }