/// <summary> /// Initializes the MIB symbol. This will remove all levels of /// indirection present, such as references to types or values. No /// information is lost by this operation. This method may modify /// this object as a side-effect. /// </summary> /// NOTE: This is an internal method that should /// only be called by the MIB loader. /// <param name="log">The MIB loader log</param> /// <exception cref="MibException"> /// If an error was encountered during the initialization /// </exception> public override void Initialize(MibLoaderLog log) { ObjectIdentifierValue oid; if (this.type != null) { try { this.type = this.type.Initialize(this, log); } catch (MibException e) { log.AddError(e.Location, e.Message); this.type = null; } } if (this.value != null) { try { this.value = this.value.Initialize(log, this.type); } catch (MibException e) { log.AddError(e.Location, e.Message); this.value = null; } } if (this.type != null && this.value != null && !this.type.IsCompatible(this.value)) { log.AddError(this.Location, "value is not compatible with type"); } if (this.value is ObjectIdentifierValue) { oid = (ObjectIdentifierValue)this.value; if (oid.Symbol == null) { oid.Symbol = this; } } }
/// <summary>Initializes the MIB symbol. This will remove all levels of /// indirection present, such as references to types or values. No /// information is lost by this operation. This method may modify /// this object as a side-effect. /// NOTE: This is an internal method that should /// only be called by the MIB loader. /// </summary> /// <param name="log">The MIB Loader Log</param> public override void Initialize(MibLoaderLog log) { if (this.type != null) { try { this.type = this.type.Initialize(this, log); } catch (MibException e) { log.AddError(e.Location, e.Message); this.type = null; } } }