private void BuildDomain(string[] domainIDAccessTree, string languageID) { if (domainIDAccessTree == null) { domainIDAccessTree = Basics.Configurations.Xeora.Application.Main.DefaultDomain; } try { this._Deployment = Deployment.InstanceFactory.Current.GetOrCreate(domainIDAccessTree); } catch (Exception.DomainNotExistsException) { // Try with the default one if requested one is not the default one if (string.Compare( string.Join("\\", domainIDAccessTree), string.Join("\\", Basics.Configurations.Xeora.Application.Main.DefaultDomain)) != 0) { this._Deployment = Deployment.InstanceFactory.Current.GetOrCreate( Basics.Configurations.Xeora.Application.Main.DefaultDomain); } else { throw; } } catch (System.Exception) { throw; } if (domainIDAccessTree.Length > 1) { string[] ParentDomainIDAccessTree = new string[domainIDAccessTree.Length - 1]; Array.Copy(domainIDAccessTree, 0, ParentDomainIDAccessTree, 0, ParentDomainIDAccessTree.Length); this.Parent = new Domain(ParentDomainIDAccessTree); } this._LanguagesHolder = new LanguagesHolder(this, this._Deployment.Languages); this._LanguagesHolder.Use(languageID); if (this._Renderer == null) { this._Renderer = new Renderer(); } this._Renderer.Inject(this); }
public void RequestDeploymentAccess(ref IDomain instance, out Deployment.Domain deployment) { deployment = null; DeploymentAccessRequested?.Invoke(ref instance, out deployment); }
private void OnDeploymentAccessRequest(ref Basics.Domain.IDomain workingInstance, ref Deployment.Domain deployment) => deployment = ((Domain)workingInstance)._Deployment;