/// <summary> /// Registers methods on a specific type if no existing methods implementation are already /// registered for the type. /// </summary> /// <param name="type">The datatype for which the methods implementation are applicable</param> /// <param name="methods">The method implementations</param> public void RegisterIfNotPresent(LType type, ITypeMethods methods) { if (!_typeToMethods.ContainsKey(type)) { _typeToMethods[type] = methods; methods.OnRegistered(); } }
/// <summary> /// Register methods on a specific type. /// </summary> /// <param name="type">The datatype for which the methods implementation are applicable</param> /// <param name="methods">The method implementations</param> public void Register(LType type, ITypeMethods methods) { _typeToMethods[type] = methods; }