public SearchScopeData(ProjectScope ep, AssetScope s, ObjectID oid, bool sd, bool lp) { projectScope = ep; assetScope = s; scopeObj = oid; searchDependencies = sd; loadPrefab = lp; }
public SearchScopeData(ProjectScope ep, AssetScope s, ObjectID oid, bool sd) { projectScope = ep; assetScope = s; scopeObj = oid; searchDependencies = sd; searchDependencies = false; }
public void Draw(SearchOptions options) { // GUILayout.Space(2); GUILayout.BeginHorizontal(); SRWindow.Instance.CVS(); GUILayout.BeginHorizontal(); float lw = EditorGUIUtility.labelWidth; EditorGUIUtility.labelWidth = SRWindow.compactLabelWidth; ProjectScope newProjectScope = (ProjectScope)EditorGUILayout.EnumPopup("Scope:", projectScope); if (newProjectScope != projectScope) { projectScope = newProjectScope; SRWindow.Instance.PersistCurrentSearch(); } if (projectScope == ProjectScope.SpecificLocation) { //Display interface for selecting a folder or scene. EditorGUIUtility.labelWidth = SRWindow.compactLabelWidth + 10; UnityEngine.Object newValue = EditorGUILayout.ObjectField(objID.obj, typeof(UnityEngine.Object), true); if (newValue != objID.obj) { objID.SetObject(newValue); SRWindow.Instance.PersistCurrentSearch(); } GUILayout.EndHorizontal(); if (objID.isDirectory) { drawAssetScope(); } } else if (projectScope == ProjectScope.SceneView) { //Don't display scope. GUILayout.EndHorizontal(); } else if (projectScope == ProjectScope.CurrentSelection) { GUILayout.EndHorizontal(); } else { //scope only. GUILayout.EndHorizontal(); drawAssetScope(); } EditorGUIUtility.labelWidth = lw; // i love stateful gui! :( SRWindow.Instance.CVE(); GUILayout.EndHorizontal(); drawDependencySelector(); }
public ProjectSession(string templatesPath, ProjectTaskTemplatesLoader projectTaskTemplatesLoader, ProjectTaskTemplatesPersister projectTaskTemplatesPersister, ProjectScopeLoader projectScopeLoader, ProjectScopePersister projectScopePersister, ProjectTaskTemplates projectTaskTemplates, ProjectScope projectScope) { TemplatesPath = templatesPath; ProjectTaskTemplatesLoader = projectTaskTemplatesLoader; ProjectTaskTemplatesPersister = projectTaskTemplatesPersister; ProjectScopeLoader = projectScopeLoader; ProjectScopePersister = projectScopePersister; ProjectTaskTemplates = projectTaskTemplates; ProjectScope = projectScope; }
public void Dispose() { // pay attention that this method will be called 2 times, once by you // and another time by the underlying LifetimeScope. So this code should // handle that gracefully (so the _scope == null). if (_scope != null) { _scope.Dispose(); _scope = null; } }
/// <summary> /// Constructor /// </summary> /// <param name="oAuthUrl"></param> /// <param name="apiUrl"></param> /// <param name="projectKey"></param> /// <param name="clientID"></param> /// <param name="clientSecret"></param> /// <param name="scope"></param> public Configuration(string oAuthUrl, string apiUrl, string projectKey, string clientID, string clientSecret, ProjectScope scope) { this.OAuthUrl = oAuthUrl; this.ApiUrl = apiUrl; this.ProjectKey = projectKey; this.ClientID = clientID; this.ClientSecret = clientSecret; this.Scope = scope; if (this.OAuthUrl.EndsWith("/")) { this.OAuthUrl = this.OAuthUrl.Remove(this.OAuthUrl.Length - 1); } if (this.ApiUrl.EndsWith("/")) { this.ApiUrl = apiUrl.Remove(this.ApiUrl.Length - 1); } }
public void PersistProjectScope(ProjectScope projectScope, string path) { var directory = Path.GetDirectoryName(path); if (directory == null) { throw new Exception("Unable to persist project scope to " + path); } if (!Directory.Exists(directory)) { try { Directory.CreateDirectory(directory); } catch (Exception) { throw new Exception("Unable to persist project scope to directory " + directory); } } File.WriteAllText(path, JsonConvert.SerializeObject(projectScope)); }
public void changeScopeTo(ProjectScope scope) { currentSearch.changeScopeTo(scope); PersistCurrentSearch(); }
public void changeScopeTo(ProjectScope scope) { searchScope.changeScopeTo(scope); }
public void changeScopeTo(ProjectScope scope) { projectScope = scope; }
public Project(ProjectScope scope /*, ...*/) { _scope = scope; }
/// <summary> /// Constructor /// </summary> /// <param name="oAuthUrl"></param> /// <param name="apiUrl"></param> /// <param name="projectKey"></param> /// <param name="clientID"></param> /// <param name="clientSecret"></param> /// <param name="scope"></param> /// <param name="internalServerErrorRetries">Used to specify amount of retries when an internal server error occurs</param> /// <param name="internalServerErrorRetryInterval">Used to specify the amount of time in milliseconds to wait between retries when an internal server error occurs</param> /// <param name="httpClientPoolItemLifetime">Used to specify the timespan to wait before disposing an HttpClient LimitedPoolItem</param> public Configuration(string oAuthUrl, string apiUrl, string projectKey, string clientID, string clientSecret, ProjectScope scope, int internalServerErrorRetries = 1, int internalServerErrorRetryInterval = 100, TimeSpan?httpClientPoolItemLifetime = null) { this.OAuthUrl = oAuthUrl; this.ApiUrl = apiUrl; this.ProjectKey = projectKey; this.ClientID = clientID; this.ClientSecret = clientSecret; this.Scope = scope; this.InternalServerErrorRetries = internalServerErrorRetries; this.InternalServerErrorRetryInterval = internalServerErrorRetryInterval; this.HttpClientPoolItemLifetime = httpClientPoolItemLifetime ?? TimeSpan.FromHours(1); if (this.OAuthUrl.EndsWith("/")) { this.OAuthUrl = this.OAuthUrl.Remove(this.OAuthUrl.Length - 1); } if (this.ApiUrl.EndsWith("/")) { this.ApiUrl = apiUrl.Remove(this.ApiUrl.Length - 1); } }