protected override void InternalValidate() { if (this.Name.Length > 64) { base.WriteError(new ArgumentException(AgentStrings.AgentNameTooLargeArgument, "Name"), ErrorCategory.InvalidArgument, null); } if (!InstallTransportAgent.IsValidAgentName(this.Name)) { base.WriteError(new ArgumentException(AgentStrings.AgentNameContainsInvalidCharacters, "Name"), ErrorCategory.InvalidArgument, null); } this.absoluteAssemblyPath = this.AssemblyPath; Server serverObject = base.GetServerObject(); bool flag = serverObject != null && serverObject.IsEdgeServer; try { if (flag) { string currentPathProviderName = base.SessionState.CurrentPathProviderName; if (string.Compare(currentPathProviderName, "FileSystem", StringComparison.OrdinalIgnoreCase) == 0) { this.absoluteAssemblyPath = Path.Combine(base.SessionState.CurrentPath, this.AssemblyPath); } } else if (!Path.IsPathRooted(this.AssemblyPath)) { base.WriteError(new ArgumentException(AgentStrings.AssemblyFilePathRelativeOnHub(this.AssemblyPath), "AssemblyPath"), ErrorCategory.InvalidArgument, null); } } catch (ArgumentException) { base.WriteError(new ArgumentException(AgentStrings.AssemblyFileNotExist(this.AssemblyPath), "AssemblyPath"), ErrorCategory.InvalidArgument, this.AssemblyPath); } if (new Uri(this.absoluteAssemblyPath).IsUnc) { base.WriteError(new ArgumentException(AgentStrings.AssemblyFilePathCanNotBeUNC(this.AssemblyPath), "AssemblyPath"), ErrorCategory.InvalidArgument, this.AssemblyPath); } if (!File.Exists(this.absoluteAssemblyPath)) { base.WriteError(new ArgumentException(AgentStrings.AssemblyFileNotExist(this.AssemblyPath), "AssemblyPath"), ErrorCategory.InvalidArgument, null); } base.InternalValidate(); }