public static DependencyAction Register <OT>(string name, bool allowClientAccess, ActionMetadata defaultMetadata)
 {
     return(Register(name, typeof(OT), allowClientAccess, defaultMetadata));
 }
        public static DependencyAction Register(string name, Type ownerType, bool allowClientAccess, ActionMetadata defaultMetadata)
        {
            var action = new DependencyAction()
            {
                Id                = Guid.NewGuid(),
                Name              = name,
                OwnerType         = ownerType,
                AllowClientAccess = allowClientAccess,
                DefaultMetadata   = defaultMetadata
            };

            lock (_actions)
                _actions.Add(action);
            return(action);
        }