public IAbcConst ImportConst(IAbcConst c) { var pool = GetConstPool(c.Kind); if (pool != null) { return(pool.Import(c)); } return(null); }
/// <summary> /// Determines whether given constant is defined in current ABC file. /// </summary> /// <param name="c">constant to test</param> /// <returns>true if the constant is defined, otherwise - false</returns> public bool IsDefined(IAbcConst c) { if (c == null) { return(false); } var pool = GetConstPool(c.Kind); if (pool != null) { return(pool.IsDefined(c)); } return(false); }
/// <summary> /// Determines whether given constant is defined in this pool. /// </summary> /// <param name="c">constant to check.</param> /// <returns>true if defined; otherwise, false</returns> public bool IsDefined(IAbcConst c) { if (c == null) { return(false); } int i = c.Index; if (i < 0 || i >= Count) { return(false); } return(ReferenceEquals(c, this[i])); }
internal static void CheckConst(IAbcConst c) { //if (c.Index == 0) // Debugger.Break(); }
IAbcConst IAbcConstPool.Import(IAbcConst c) { return(Import((T)c)); }
bool IAbcConstPool.IsDefined(IAbcConst c) { return(IsDefined((T)c)); }
/// <summary> /// Imports given constant. /// </summary> /// <param name="c">constant to import.</param> /// <returns>imported constant.</returns> public IAbcConst Import(IAbcConst c) { return(Import((AbcConst <T>)c)); }