internal ScopedItemLookupPath(ScopedItemLookupPath silp, bool isLocal) { if (isLocal) { this.isUnqualified = false; this.isLocalLookup = true; } else { this.isUnqualified = silp.isUnqualified; } this.isGlobalLookup = silp.IsGlobal; this.isPrivateLookup = silp.isPrivateLookup; this.isScopedItem = silp.isScopedItem; this.isScriptLookup = silp.isScriptLookup; this.modifiedPath = silp.modifiedPath; this.userPath = silp.userPath; }
internal ScopedItemLookupPath(string path) { this.userPath = path != null ? path : throw new ArgumentNullException(nameof(path)); UniversalResourceName universalResourceName = new UniversalResourceName(path); if (string.Equals(universalResourceName.NamespaceID, "GLOBAL", StringComparison.OrdinalIgnoreCase)) { this.isGlobalLookup = true; this.isScopedItem = true; this.modifiedPath = new UniversalResourceName(universalResourceName.NamespaceSpecificString); } else if (string.Equals(universalResourceName.NamespaceID, "LOCAL", StringComparison.OrdinalIgnoreCase)) { this.isLocalLookup = true; this.isScopedItem = true; this.modifiedPath = new UniversalResourceName(universalResourceName.NamespaceSpecificString); } else if (string.Equals(universalResourceName.NamespaceID, "Variable", StringComparison.OrdinalIgnoreCase)) { this.isScopedItem = true; this.modifiedPath = new UniversalResourceName(universalResourceName.NamespaceSpecificString); } else if (string.Equals(universalResourceName.NamespaceID, "PRIVATE", StringComparison.OrdinalIgnoreCase)) { this.isPrivateLookup = true; this.isScopedItem = true; this.modifiedPath = new UniversalResourceName(universalResourceName.NamespaceSpecificString); } else if (string.Equals(universalResourceName.NamespaceID, "SCRIPT", StringComparison.OrdinalIgnoreCase)) { this.isScopedItem = true; this.isScriptLookup = true; this.modifiedPath = new UniversalResourceName(universalResourceName.NamespaceSpecificString); } else { this.isUnqualified = true; if (string.IsNullOrEmpty(universalResourceName.NamespaceID)) { this.isScopedItem = true; } this.modifiedPath = universalResourceName; } }
internal FunctionLookupPath(string path) { this.userPath = path; UniversalResourceName universalResourceName = new UniversalResourceName(path); if (string.Equals(universalResourceName.NamespaceID, "GLOBAL", StringComparison.OrdinalIgnoreCase)) { this.isGlobalLookup = true; this.isScopedItem = true; } else if (string.Equals(universalResourceName.NamespaceID, "LOCAL", StringComparison.OrdinalIgnoreCase)) { this.isLocalLookup = true; this.isScopedItem = true; } else if (string.Equals(universalResourceName.NamespaceID, "Variable", StringComparison.OrdinalIgnoreCase)) { this.isScopedItem = true; } else if (string.Equals(universalResourceName.NamespaceID, "PRIVATE", StringComparison.OrdinalIgnoreCase)) { this.isPrivateLookup = true; this.isScopedItem = true; } else if (string.Equals(universalResourceName.NamespaceID, "SCRIPT", StringComparison.OrdinalIgnoreCase)) { this.isScopedItem = true; this.isScriptLookup = true; } else { this.isUnqualified = true; this.isScopedItem = true; universalResourceName = new UniversalResourceName(); universalResourceName.NamespaceSpecificString = path; } this.modifiedPath = universalResourceName; }