/// <summary> /// Returns the AppDomain that shall be used to host script execution. /// </summary> /// <returns></returns> private AppDomain GetOrCreateHostingDomain(HostingType hostingType) { AppDomain domain; switch (hostingType) { case HostingType.GlobalAppDomain: Trace.WriteLine($"Script {UniqueId} - executing in global domain"); domain = this.HostingHelper.GlobalDomain; this.m_appDomainDisposable = null; return(domain); case HostingType.SharedSandboxAppDomain: Trace.WriteLine($"Script {UniqueId} - executing in shared domain"); this.m_appDomainDisposable = null; domain = this.HostingHelper.SharedScriptDomain; return(domain); case HostingType.IndividualScriptAppDomain: Trace.WriteLine($"Script {UniqueId} - executing in individual domain"); domain = this.HostingHelper.IndividualScriptDomain; this.m_appDomainDisposable = new DelegateDisposable(() => DisposeDomain(domain)); return(domain); default: throw new InvalidOperationException($"Unknown HostingType {hostingType}"); } }
public IEnumerable <IAuthMethod> GetAuthMethods(HostingType hostingType) { switch (hostingType) { case HostingType.WebGeneric: return(new List <IAuthMethod>() { new OpenIDConnectAuthMethod(), new LDAPAuthMethod(), }); case HostingType.WebGatekeeperProxy: return(new List <IAuthMethod>() { new GatkeeperProxyAuthMethod(), new OpenIDConnectAuthMethod(), new LDAPAuthMethod(), }); case HostingType.NonWeb: return(new List <IAuthMethod>() { new LDAPAuthMethod(), }); default: throw new NotImplementedException(); } }
public EnvironmentDefinition( AzureEnvironment azureEnvironment, HostingType hostingType, StandaloneConfiguration standaloneConfiguration) { _azureEnvironment = azureEnvironment; _hostingType = hostingType; _standaloneConfiguration = standaloneConfiguration; }
public EnvironmentDefinition( AzureEnvironment azureEnvironment, HostingType hostingType, StandaloneConfiguration standaloneConfiguration) { _azureEnvironment = azureEnvironment; _hostingType = hostingType; _standaloneConfiguration = standaloneConfiguration; }
public override int GetHashCode() { unchecked { int hash = (int)2166136261; hash = (hash * 16777619) ^ ReturnType.GetHashCode(); hash = (hash * 16777619) ^ HostingType.GetHashCode(); return(hash); } }
public override void OnInspectorGUI() { serializedObject.Update(); hostingType = (HostingType)EditorGUILayout.EnumPopup("Hosting Type", hostingType); showHostProp = hostingType == HostingType.REMOTE; if (showHostProp) { hostProp.stringValue = EditorGUILayout.TextField("Host", hostProp.stringValue); } else { hostProp.stringValue = "localhost"; } portProp.intValue = EditorGUILayout.IntField("Port", portProp.intValue); serializedObject.ApplyModifiedProperties(); }
public void ReadXml(XmlReader reader) { reader.MoveToCustomStart(); this.References = reader.ReadEnumerable <Assembly>(nameof(References), x => { string value = (string)x; Assembly assembly = Assembly.Load(value); return(assembly); }).ToList(); this.Imports = reader.ReadEnumerable <string>(nameof(Imports), x => (string)x).ToList(); object _hostingType; reader.Read(nameof(HostingType), out _hostingType); this.HostingType = (HostingType)_hostingType; reader.ReadEndElement(); }
public XlScriptOptions(Type ReturnType, HostingType HostingType) { this.ReturnType = ReturnType; this.HostingType = HostingType; }
public XlScriptOptions() { this.ReturnType = typeof(Object); this.HostingType = HostingType.SharedSandboxAppDomain; }