void ReleaseDesignerOutlets() { if (LoginBtn != null) { LoginBtn.Dispose(); LoginBtn = null; } if (LoginGifWebView != null) { LoginGifWebView.Dispose(); LoginGifWebView = null; } if (ProfileName != null) { ProfileName.Dispose(); ProfileName = null; } if (SearchBackgroundView != null) { SearchBackgroundView.Dispose(); SearchBackgroundView = null; } }
public LoadProfile(Dictionary <string, string> args) : base(args) { QBCLog.BehaviorLoggingContext = this; try { // QuestRequirement* attributes are explained here... // http://www.thebuddyforum.com/mediawiki/index.php?title=Honorbuddy_Programming_Cookbook:_QuestId_for_Custom_Behaviors // ...and also used for IsDone processing. ProfileName = GetAttributeAs <string>("ProfileName", true, ConstrainAs.StringNonEmpty, new[] { "Profile" }) ?? ""; RememberProfile = GetAttributeAsNullable <bool>("RememberProfile", false, null, null) ?? false; if (!ProfileName.ToLower().EndsWith(".xml")) { ProfileName += ".xml"; } } catch (Exception except) { // Maintenance problems occur for a number of reasons. The primary two are... // * Changes were made to the behavior, and boundary conditions weren't properly tested. // * The Honorbuddy core was changed, and the behavior wasn't adjusted for the new changes. // In any case, we pinpoint the source of the problem area here, and hopefully it // can be quickly resolved. QBCLog.Exception(except); IsAttributeProblem = true; } }
public async Task GetProfileAsync() { Mock <ProfileService.ProfileServiceClient> mockGrpcClient = new Mock <ProfileService.ProfileServiceClient>(MockBehavior.Strict); GetProfileRequest expectedRequest = new GetProfileRequest { ProfileName = new ProfileName("[PROJECT]", "[TENANT]", "[PROFILE]"), }; Profile expectedResponse = new Profile { ProfileName = new ProfileName("[PROJECT]", "[TENANT]", "[PROFILE]"), ExternalId = "externalId-1153075697", Source = "source-896505829", Uri = "uri116076", GroupId = "groupId506361563", Processed = true, KeywordSnippet = "keywordSnippet1325317319", }; mockGrpcClient.Setup(x => x.GetProfileAsync(expectedRequest, It.IsAny <CallOptions>())) .Returns(new Grpc.Core.AsyncUnaryCall <Profile>(Task.FromResult(expectedResponse), null, null, null, null)); ProfileServiceClient client = new ProfileServiceClientImpl(mockGrpcClient.Object, null); ProfileName name = new ProfileName("[PROJECT]", "[TENANT]", "[PROFILE]"); Profile response = await client.GetProfileAsync(name); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public override void ExecuteCmdlet() { if (ParameterSetName == ObjectParameterSet) { ResourceGroupName = CdnProfile.ResourceGroupName; ProfileName = CdnProfile.Name; } var existingProfile = CdnManagementClient.Profiles.List() .Select(p => p.ToPsProfile()) .Where(p => p.Name.ToLower() == ProfileName.ToLower()) .FirstOrDefault(p => p.ResourceGroupName.ToLower() == ResourceGroupName.ToLower()); if (existingProfile == null) { throw new PSArgumentException(string.Format( Resources.Error_DeleteNonExistingProfile, ProfileName, ResourceGroupName)); } ConfirmAction(Force, string.Format(Resources.Confirm_RemoveProfile, ProfileName), this.MyInvocation.InvocationName, ProfileName, () => CdnManagementClient.Profiles.Delete(ResourceGroupName, ProfileName), () => ContainsEndpoints()); if (PassThru) { WriteObject(true); } }
/// <summary> /// Allows you to load a profile, it needs to be in the same folder as your current profile. /// ##Syntax## /// ProfileName: The name of the profile with the ".xml" extension. /// </summary> /// public LoadProfile(Dictionary <string, string> args) : base(args) { try { // QuestRequirement* attributes are explained here... // http://www.thebuddyforum.com/mediawiki/index.php?title=Honorbuddy_Programming_Cookbook:_QuestId_for_Custom_Behaviors // ...and also used for IsDone processing. ProfileName = GetAttributeAs <string>("ProfileName", true, ConstrainAs.StringNonEmpty, new[] { "Profile" }) ?? ""; if (!ProfileName.ToLower().EndsWith(".xml")) { ProfileName += ".xml"; } } catch (Exception except) { // Maintenance problems occur for a number of reasons. The primary two are... // * Changes were made to the behavior, and boundary conditions weren't properly tested. // * The Honorbuddy core was changed, and the behavior wasn't adjusted for the new changes. // In any case, we pinpoint the source of the problem area here, and hopefully it // can be quickly resolved. LogMessage("error", "BEHAVIOR MAINTENANCE PROBLEM: " + except.Message + "\nFROM HERE:\n" + except.StackTrace + "\n"); IsAttributeProblem = true; } }
protected override void OnAddedToScene() { base.OnAddedToScene(); ((InterfaceScene)Scene).Focused = ProfileName; ProfileName.SelectAll(); }
/// <summary> /// Adds a profile for an account /// </summary> /// <param name="profileName"></param> /// <param name="accountName"></param> /// <param name="profileSettings"></param> /// <returns></returns> public IProfile AddProfile(ProfileName profileName, AccountName accountName, object profileSettings) { var command = new ExecutePluginCommandCommand { CommandName = EmbeddedPluginCommands.AddProfile, Arguments = new PluginProfileDto { Name = profileName.Value, Settings = profileSettings }.Serialize() }; HandleMessageFromTp( new List <HeaderInfo> { new HeaderInfo { Key = BusExtensions.ACCOUNTNAME_KEY, Value = accountName.Value } }, command); var account = ObjectFactory.GetInstance <IAccountCollection>().GetOrCreate(accountName); var profile = account.Profiles[profileName]; if (profile == null) { throw new ApplicationException( string.Format( "Profile '{0}' was not found in account '{1}'. Probably it's because profile did not pass validation -- check TpQueue for errors", profileName.Value, accountName.Value)); } return(profile); }
/// <summary> /// Saves the profile into the input configuration node. /// </summary> /// <param name="node"></param> public void SaveProfile(ConfigNode node) { if (ProfileName.StartsWith("Default-"))//provide in-config file warning for people to not trample on the default configs... { node.SetValue("name", ProfileName, "Current profile name. Please make copies of the default profiles and specify new names if you wish to change settings.", true); } else { node.SetValue("name", ProfileName, true); } node.SetValue("hdr", HDREnabled, true); node.SetValue("antialiasing", AntiAliasing.ToString(), true); int len = Settings.Count; for (int i = 0; i < len; i++) { if (Settings[i].enabled) { ConfigNode effectNode = new ConfigNode("EFFECT"); effectNode.SetValue("name", TUFXProfileManager.GetBuiltinEffect(Settings[i]).ToString(), true); Settings[i].Save(effectNode); node.AddNode(effectNode); } } }
public void GetProfile() { Mock <ProfileService.ProfileServiceClient> mockGrpcClient = new Mock <ProfileService.ProfileServiceClient>(MockBehavior.Strict); GetProfileRequest expectedRequest = new GetProfileRequest { ProfileName = new ProfileName("[PROJECT]", "[TENANT]", "[PROFILE]"), }; Profile expectedResponse = new Profile { ProfileName = new ProfileName("[PROJECT]", "[TENANT]", "[PROFILE]"), ExternalId = "externalId-1153075697", Source = "source-896505829", Uri = "uri116076", GroupId = "groupId506361563", ResumeHrxml = "resumeHrxml1834730555", Processed = true, KeywordSnippet = "keywordSnippet1325317319", }; mockGrpcClient.Setup(x => x.GetProfile(expectedRequest, It.IsAny <CallOptions>())) .Returns(expectedResponse); ProfileServiceClient client = new ProfileServiceClientImpl(mockGrpcClient.Object, null); ProfileName name = new ProfileName("[PROJECT]", "[TENANT]", "[PROFILE]"); Profile response = client.GetProfile(name); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
public async Task CreateApplicationAsync() { Mock <ApplicationService.ApplicationServiceClient> mockGrpcClient = new Mock <ApplicationService.ApplicationServiceClient>(MockBehavior.Strict); CreateApplicationRequest expectedRequest = new CreateApplicationRequest { ParentAsProfileName = new ProfileName("[PROJECT]", "[TENANT]", "[PROFILE]"), Application = new Application(), }; Application expectedResponse = new Application { ApplicationName = new ApplicationName("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]"), ExternalId = "externalId-1153075697", Profile = "profile-309425751", Job = "job105405", Company = "company950484093", OutcomeNotes = "outcomeNotes-355961964", JobTitleSnippet = "jobTitleSnippet-1100512972", }; mockGrpcClient.Setup(x => x.CreateApplicationAsync(expectedRequest, It.IsAny <CallOptions>())) .Returns(new Grpc.Core.AsyncUnaryCall <Application>(Task.FromResult(expectedResponse), null, null, null, null)); ApplicationServiceClient client = new ApplicationServiceClientImpl(mockGrpcClient.Object, null); ProfileName parent = new ProfileName("[PROJECT]", "[TENANT]", "[PROFILE]"); Application application = new Application(); Application response = await client.CreateApplicationAsync(parent, application); Assert.Same(expectedResponse, response); mockGrpcClient.VerifyAll(); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Timestamp != null) { hashCode = hashCode * 59 + Timestamp.GetHashCode(); } if (ProfileId != null) { hashCode = hashCode * 59 + ProfileId.GetHashCode(); } if (ProfileName != null) { hashCode = hashCode * 59 + ProfileName.GetHashCode(); } if (SignatureRequired != null) { hashCode = hashCode * 59 + SignatureRequired.GetHashCode(); } if (Textures != null) { hashCode = hashCode * 59 + Textures.GetHashCode(); } return(hashCode); } }
public IActionResult OnPostOSSCProfileCycle(ProfileName profile1, ProfileName profile2) { _ossc.LoadProfile(profile1); Thread.Sleep(TimeSpan.FromSeconds(3)); _ossc.LoadProfile(profile2); return(RedirectToPage()); }
internal void ProfileAdd() { // Populate the excel data GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ProfilePage"); GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//i[@class='dropdown icon'])[2]")); //Click Profilename ProfileName.Click(); //Enter Firstname Firstname.Clear(); Firstname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Firstname")); //Enter Lastname Lastname.Clear(); Lastname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Lastname")); //Save profilename SaveProfileName.Click(); var fname = GlobalDefinitions.ExcelLib.ReadData(2, "Firstname"); var Lname = GlobalDefinitions.ExcelLib.ReadData(2, "Lastname"); var title = fname + " " + Lname; GlobalDefinitions.wait(40); Assert.AreEqual(Titlename.Text, title); }
public Profile Update(ProfileName profileName, bool initialized, AccountName accountName) { var index = _profiles[accountName].FindIndex(x => x.Name == profileName.Value); _profiles[accountName][index].Initialized = initialized; _profiles[accountName][index].Name = profileName.Value; return(_profiles[accountName][index]); }
public static dynamic GetTSObject(ProfileName dynObject) { if (dynObject is null) { return(null); } return(dynObject.teklaObject); }
IProfileReadonly IProfileCollectionReadonly.this[ProfileName profileName] { get { IPluginCurrentObjectContextReadonly c = _currentObjectContext; return(c.ProfileCollection[profileName]); } }
public override int GetHashCode() { int hash = 13; hash = (hash * 7) + (!Object.ReferenceEquals(null, ProfileName) ? ProfileName.GetHashCode() : 0); hash = (hash * 7) + (!Object.ReferenceEquals(null, Hostname) ? Hostname.GetHashCode() : 0); return(hash); }
private GenericCommandName ConvertProfieNameToGenericCommandName(ProfileName profileName) { if (!_profileNameToGenericCommandName.ContainsKey(profileName)) { throw new ArgumentException($"Unable to convert {profileName.ToString()} to a GenericCommandName.", nameof(profileName)); } return(_profileNameToGenericCommandName[profileName]); }
public override string GetStepParameters() { var parameters = new List <string>(); parameters.Add(ProfileType.ToStepValue()); parameters.Add(ProfileName != null ? ProfileName.ToStepValue() : "$"); return(string.Join(", ", parameters.ToArray())); }
public ProfileDomainObject(ProfileName profileName, AccountName accountName, bool initialized, Type profileSettingsType) { _profileName = profileName; _accountName = accountName; _profileSettingsType = profileSettingsType; Initialized = initialized; _settings = null; EventAggregator = null; ProfileRepository = null; }
public void DeletePluginProfile(ProfileName pluginProfile) { ChangeProfiles(profileCollection => { var profile = profileCollection[pluginProfile]; profile.Log.Remove(); profile.FileStorage.Clear(); profileCollection.Remove(profile); }); }
public ProfileDomainObject(ProfileDomainObject other) : base(other) { _profileName = other._profileName; _accountName = other._accountName; _profileSettingsType = other._profileSettingsType; Initialized = other.Initialized; _settings = null; EventAggregator = other.EventAggregator; ProfileRepository = other.ProfileRepository; }
/// <summary>Snippet for GetProfile</summary> public void GetProfile() { // Snippet: GetProfile(ProfileName,CallSettings) // Create client ProfileServiceClient profileServiceClient = ProfileServiceClient.Create(); // Initialize request argument(s) ProfileName name = new ProfileName("[PROJECT]", "[COMPANY]", "[PROFILE]"); // Make the request Profile response = profileServiceClient.GetProfile(name); // End snippet }
public override bool Equals(object obj) { //Check for null and compare run-time types. if (obj == null || GetType() != obj.GetType()) { return(false); } var p = (TrackedProfile)obj; return(ProfileName.Equals(p.ProfileName)); }
/// <summary>Snippet for CreateApplication</summary> public void CreateApplicationResourceNames() { // Snippet: CreateApplication(ProfileName, Application, CallSettings) // Create client ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.Create(); // Initialize request argument(s) ProfileName parent = ProfileName.FromProjectTenantProfile("[PROJECT]", "[TENANT]", "[PROFILE]"); Application application = new Application(); // Make the request Application response = applicationServiceClient.CreateApplication(parent, application); // End snippet }
public static void SetOut(this IBus bus, ProfileName profileName) { bus.OutgoingHeaders[PROFILENAME_KEY] = profileName.Value; }
public static void SetIn(this IBus bus, ProfileName profileName) { bus.CurrentMessageContext.Headers[PROFILENAME_KEY] = profileName.Value; }
public PluginProfile(ProfileName name) { Name = name; }