using Esiur.Core; using Esiur.Data.Types; using Esiur.Protocol; using System; using System.Collections.Generic; using System.Text; namespace Esiur.Data { public interface IDynamicResource { public PropertyValue[] SerializeResource(); public Map SerializeResourceAfter(ulong age); public object GetResourceProperty(byte index); public AsyncReply SetResourcePropertyAsync(byte index, object value); public void SetResourceProperty(byte index, object value); public TypeDef ResourceDefinition { get; } } /// /// Optional server-side invocation hook for local resources whose type /// definition is assembled at runtime. Remote /// proxies remain unchanged; this hook gives their local counterpart the /// same dynamic function semantics. /// public interface IDynamicResourceFunctionHandler { public AsyncReply InvokeResourceFunctionAsync( byte index, object arguments, InvocationContext context); } public delegate void DynamicResourceEventHandler(byte index, object value); /// /// Optional event bridge for a local runtime-defined resource. /// public interface IDynamicResourceEventSource { public event DynamicResourceEventHandler ResourceEventOccurred; } }