Beispiel #1
0
 private bool createHfdmWorkspace(ref Lynx.PropertySets.HFDM hfdm, ref Lynx.PropertySets.Workspace workspace, PropertySetsServerUrl propertySetsServerUrl, System.Func <string> getBearerToken)
 {
     sessionLogger.Log("create hfdm and workspace: " + propertySetsServerUrl.ToString());
     hfdm = LynxPropertySetsCSharp.CreateHFDM();
     using (var eventWaitHandle = new System.Threading.EventWaitHandle(false, System.Threading.EventResetMode.ManualReset))
     {
         hfdm.connect(propertySetsServerUrl.url, (error) => { if (error != null)
                                                              {
                                                                  sessionLogger.Log("error: " + error.what());
                                                              }
                                                              eventWaitHandle.Set(); }, getBearerToken);
         eventWaitHandle.WaitOne();
     }
     sessionLogger.Log("hfdm is connected: " + hfdm.isConnected());
     if (hfdm.isConnected())
     {
         workspace = hfdm.createWorkspace();
     }
     return(hfdm.isConnected() && null != workspace);
 }
Beispiel #2
0
 private void button_Checkout_Click(object sender, System.EventArgs e)
 {
     if ((hfdm?.isConnected()).GetValueOrDefault(false) && !(workspace?.isCheckedOut()).GetValueOrDefault(true))
     {
         if (isEmptyBranchGuid(getBranchGuidFromUserInterface()))
         {
             setBranchGuidOnUserInterface(createRepository(hfdm)[0].branchNode.getGuid());
             sessionLogger.Log("***created*** branch guid: " + getBranchGuidFromUserInterface());
         }
         if (!string.IsNullOrEmpty(currentPropertySetsServerUrl.inspectorUrl))
         {
             var inspectorUrl = currentPropertySetsServerUrl.inspectorUrl + getBranchGuidFromUserInterface();
             System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(inspectorUrl));
             cefBrowser.Load(inspectorUrl);
             sessionLogger.Log("inspector url: " + inspectorUrl);
         }
         checkoutWorkspace(workspace, getBranchGuidFromUserInterface());
         joinBranch(hfdm, workspace, getBranchGuidFromUserInterface());
     }
 }