Esempio n. 1
0
 private void Players_OnLinkPlayer(object sender, Player e)
 {
     if (Entitys.ContainsKey(e.CurrentEntityId))
     {
         Entitys.Remove(e.CurrentEntityId);
     }
     Entitys.Add(e.CurrentEntityId, e);
 }
Esempio n. 2
0
        public ProjectServiceTemplate(CompileBase compile, ServiceMetadata data)
        {
            this.Data = data;

            this.Compiler = compile as ServiceCompile;
            this.Entitys  = new Dictionary <ProjectDocument, ControllerConfigure>();
            foreach (var entity in Compiler.ProjectItems.Values.Where(a => a.DocumentType == GlobalIds.DocumentType.Entity))
            {
                var def = Compiler.GetDocumentBody(entity) as EntityDefinition;
                if (def.Controller != null)
                {
                    Entitys.Add(entity, def.Controller);
                }
            }
        }