/*--------------------------------------------------------------------------------------------*/ private void AddArtifactEmailLink(Artifact pArt, SetupEmailId pSetupEmailId) { Email em = Data.GetVertex <Email>((long)pSetupEmailId); AddEdge(pArt, new ArtifactUsesEmail(), em); AddEdge(em, new EmailUsedByArtifact(), pArt); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ 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); }
/*--------------------------------------------------------------------------------------------*/ 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); }
/*--------------------------------------------------------------------------------------------*/ 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); }