コード例 #1
0
        internal static void ForWorkspace(
            WorkspaceInfo wkInfo,
            IPlasticAPI plasticApi)
        {
            RepositoryInfo repInfo = null;

            IThreadWaiter waiter = ThreadWaiter.GetWaiter(10);

            waiter.Execute(
                /*threadOperationDelegate*/ delegate
            {
                RepositorySpec repSpec = plasticApi.GetRepositorySpec(wkInfo);

                repInfo = plasticApi.GetRepositoryInfo(repSpec);
            },
                /*afterOperationDelegate*/ delegate
            {
                if (waiter.Exception != null)
                {
                    ExceptionsHandler.LogException(
                        "SetupCloudProjectId",
                        waiter.Exception);
                    return;
                }

                SetupCloudProjectId.ForRepository(repInfo);
            });
        }
コード例 #2
0
        internal static void ForWorkspace(
            WorkspaceInfo wkInfo,
            IPlasticAPI plasticApi)
        {
            if (HasCloudProjectId())
            {
                return;
            }

            string repGuid = null;

            IThreadWaiter waiter = ThreadWaiter.GetWaiter(10);

            waiter.Execute(
                /*threadOperationDelegate*/ delegate
            {
                RepositorySpec repSpec = plasticApi.GetRepositorySpec(wkInfo);
                RepositoryInfo repInfo = plasticApi.GetRepositoryInfo(repSpec);

                repGuid = repInfo.GUID.ToString();
            },
                /*afterOperationDelegate*/ delegate
            {
                if (waiter.Exception != null)
                {
                    ExceptionsHandler.LogException(
                        "SetupCloudProjectId",
                        waiter.Exception);
                }

                ConfigureCloudProjectId(repGuid);
            });
        }