public static void AddToPacket(ILazyValue value, Packet packet) { packet.AddInt32(value.RawValue); packet.AddInt32(value.Rate); packet.AddInt32(value.Upkeep); packet.AddInt32(value.Limit); packet.AddUInt32(UnixDateTime.DateTimeToUnix(value.LastRealizeTime.ToUniversalTime())); }
public virtual void RegisterType(Type type, ILazyValue lazyInstance, params object[] options) { if (type == null) { throw new ArgumentNullException(nameof(type)); } if (lazyInstance == null) { throw new ArgumentNullException(nameof(lazyInstance)); } Mappings.RegisterType(type, lazyInstance, options); }
public TypeResolverTypeMappingContext RegisterType(Type type, ILazyValue lazyInstance, object[] options, bool addToList = true) { var fullName = type?.FullName; var result = new TypeResolverTypeMappingContext(fullName, null, options) { ToType = type, ToName = fullName, LazyInstance = lazyInstance, MappingType = MappingType.Singleton }; if (addToList) { RegisterContext(result); } return(result); }
public virtual void RegisterType(string name, ILazyValue lazyInstance, params object[] options) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (Exists(name)) { throw new InvalidOperationException("Name already exists."); } if (lazyInstance == null) { throw new ArgumentNullException(nameof(lazyInstance)); } var result = Mappings.RegisterType(null, lazyInstance, options, addToList: false); //result.StrongName = name; //result.BindingStrongName = name; result.BindingNames.Add(name); Mappings.RegisterContext(result); }
public void RegisterType(Type type, ILazyValue lazyInstance, params object[] options) { throw new NotImplementedException(); }