Exemple #1
0
        /*--------------------------------------------------------------------------------------------*/
        private void AddArtifactEmailLink(Artifact pArt, SetupEmailId pSetupEmailId)
        {
            Email em = Data.GetVertex <Email>((long)pSetupEmailId);

            AddEdge(pArt, new ArtifactUsesEmail(), em);
            AddEdge(em, new EmailUsedByArtifact(), pArt);
        }
Exemple #2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        private void AddEmail(SetupEmailId pId, string pAddress)
        {
            var e = new Email();

            e.Address  = pAddress;
            e.Code     = DataUtil.Code32;
            e.Verified = true;
            AddVertex(e, (SetupVertexId)(long)pId);
        }
Exemple #3
0
        /*--------------------------------------------------------------------------------------------*/
        private void AddUser(SetupUserId pId, string pName, string pPass, SetupEmailId pSetupEmailId)
        {
            var u = new User();

            u.Name     = pName;
            u.NameKey  = pName.ToLower();
            u.Password = DataUtil.HashPassword(pPass);
            AddArtifact(u, (SetupArtifactId)(long)pId);
            AddArtifactEmailLink(u, pSetupEmailId);
        }
Exemple #4
0
        /*--------------------------------------------------------------------------------------------*/
        private void AddApp(SetupAppId pId, string pName, SetupEmailId pSetupEmailId, string pSecret)
        {
            var a = new App();

            a.Name    = pName;
            a.NameKey = pName.ToLower();
            a.Secret  = pSecret;
            AddArtifact(a, (SetupArtifactId)(long)pId);
            AddArtifactEmailLink(a, pSetupEmailId);
        }