public FetchConfigurationForCustomCommand(IntegrationAction action, IntegrationType type, Frequency frequency, string customDay) { Type = type; Action = action; Frequency = frequency; CustomDay = customDay; }
public FetchConfigurationForClientCommand(IntegrationAction action, IntegrationType type, Frequency frequency, Guid contractId, Guid packageId) { Type = type; Action = action; Frequency = frequency; ContractId = contractId; PackageId = packageId; }
public SyncLog(string path, IntegrationType integrationType) { _logPath = path; _fileName = string.Format("{0} Debug File - {1}{2}{3}.txt", integrationType.ToString(), DateTime.UtcNow.Month.ToString(), DateTime.UtcNow.Day.ToString(), DateTime.UtcNow.Year.ToString()); if (!Directory.Exists(_logPath)) { Directory.CreateDirectory(_logPath); } }
private void SetMarketWidgetType() { if (_widgetType == IntegrationType.Auto) { #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IPHONE) _widgetType = IntegrationType.Basic; #else _widgetType = IntegrationType.Market; #endif } }
private void SetupCommands(IntegrationType type, IIntegration integration) { if (!CommandManagers.ContainsKey(type)) { CommandManagers[type] = new CommandsManager(integration); } //BaseOwnerModule owner = new BaseOwnerModule(this); //owner.Install(CommandManagers[type]); //FunModule fModule = new FunModule(); //fModule.Install(CommandManagers[type]); }
public void GetById_CorrectDataGot_ActualEqualsExpectedData() { var expectedIntegrationType = new IntegrationType { ID = 1, Description = "Twitch" }; IntegrationType actualIntegrationType; using (var integrationTypeRepo = new IntegrationTypeRepository(new brothershipEntities(ConnectionStrings.TEST_CONNECTION_STRING_NAME))) { actualIntegrationType = integrationTypeRepo.GetById(expectedIntegrationType.ID); } AssertIntegrationTypesEqual(expectedIntegrationType, actualIntegrationType); }
private IntegrationType AddandGetTestIntegrationType() { var integrationType = new IntegrationType { ID = 2, Description = "TestType" }; using (var integrationTypeRepo = new IntegrationTypeRepository(new brothershipEntities(ConnectionStrings.TEST_CONNECTION_STRING_NAME))) { integrationTypeRepo.Add(integrationType); integrationTypeRepo.SaveChanges(); } return(integrationType); }
public void WriteToCrmErrorReport(LoginUser loginUser, string errorMessage, int organizationId, string objectId, string objectType, string objectFieldName, string objectData, string operation, IntegrationType integration, string orientation, CRMLinkErrors crmErrors, bool logText = false) { CRMLinkError error = crmErrors.FindUnclearedByObjectIDAndFieldName(objectId, objectFieldName); if (error == null) { CRMLinkErrors newCrmLinkError = new CRMLinkErrors(loginUser); error = newCrmLinkError.AddNewCRMLinkError(); error.OrganizationID = organizationId; error.CRMType = Enums.GetDescription(integration); error.Orientation = orientation; error.ObjectType = objectType; error.ObjectID = objectId.ToString(); error.ObjectFieldName = objectFieldName; error.ObjectData = objectData; error.Exception = errorMessage; error.OperationType = operation; error.ErrorCount = 1; error.IsCleared = false; error.ErrorMessage = errorMessage; newCrmLinkError.Save(); } else { error.ErrorCount = error.ErrorCount + 1; error.IsCleared = false; error.ObjectData = objectData; error.Exception = errorMessage; error.Collection.Save(); } if (logText) { Write(errorMessage); } }
private void Log(IntegrationType integration, string text) { switch (integration) { case IntegrationType.Slack: Console.ForegroundColor = ConsoleColor.Green; Console.Write($"[Slack] "); break; case IntegrationType.Discord: Console.ForegroundColor = ConsoleColor.DarkMagenta; Console.Write($"[Discord] "); break; } Console.ForegroundColor = ConsoleColor.White; Console.WriteLine(text); }
public void Add_ActualAddedData_EqualsExpectedData() { var expectedIntegrationType = new IntegrationType { Description = "Beam" }; IntegrationType actualIntegrationType; using (var integrationTypeRepo = new IntegrationTypeRepository(new brothershipEntities(ConnectionStrings.TEST_CONNECTION_STRING_NAME))) { integrationTypeRepo.Add(expectedIntegrationType); integrationTypeRepo.SaveChanges(); actualIntegrationType = integrationTypeRepo.GetById(expectedIntegrationType.ID); } AssertIntegrationTypesEqual(expectedIntegrationType, actualIntegrationType); }
/// <summary> /// Aggiorna una richiesta di integrazione /// </summary> /// <param name="CommId">Id commissione</param> /// <param name="Text">Testo richiesta</param> /// <param name="Type">Tipo richiesta</param> /// <param name="SubmissionId">Id sottomissione</param> /// <param name="SubmissionFieldId">Id campo sottomissione</param> /// <param name="SubmitterId">Id sottomittore</param> /// <param name="IntegrationId">Id integrazione</param> /// <param name="send">Se a true, la imposta come inviata, altrimenti la lascia in bozza</param> public void SaveRequest( long CommId, string Text, IntegrationType Type, long SubmissionId, long SubmissionFieldId, int SubmitterId, long IntegrationId, bool send) { bool success = CallService.IntegrationAdd(CommId, Text, Type, SubmissionId, SubmissionFieldId, SubmitterId, IntegrationId, send); if (success) { View.ForceBind(); } }
public void LoadForIntegration(int actionID, IntegrationType integration) { using (SqlCommand command = new SqlCommand()) { string commandSql = string.Empty; commandSql = @" SELECT a.*, (u.FirstName + ' ' + u.LastName) AS CreatorName FROM Attachments a LEFT JOIN Users u ON u.UserID = a.CreatorID WHERE RefID = @RefID AND RefType = 0 {0}" ; string integrationFilter = string.Empty; switch (integration) { case IntegrationType.Jira: integrationFilter = "AND SentToJira = 0"; break; case IntegrationType.TFS: integrationFilter = "AND SentToTFS = 0"; break; case IntegrationType.ServiceNow: integrationFilter = "AND SentToSnow = 0"; break; default: break; } commandSql = string.Format(commandSql, integrationFilter); command.CommandText = commandSql; command.CommandType = CommandType.Text; command.Parameters.AddWithValue("@RefID", actionID); Fill(command); } }
public static Integrator GetIntegrator(this IntegrationType type) { switch (type) { default: case IntegrationType.Euler: return(euler); case IntegrationType.ImplicitEuler: return(implicitEuler); case IntegrationType.Heun: return(heun); case IntegrationType.LeapFrog: return(leapFrog); case IntegrationType.Midpoint: return(midpoint); } }
private GreenScalarCalculator( ILogger logger, OmegaModel model, FieldToField ftof, IntegrationType integrationType) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (model == null) { throw new ArgumentNullException(nameof(model)); } _logger = logger; _model = model; _ftof = ftof; _integrationType = integrationType; _alphaBeta = AlphaBeta.CreateFrom(model.Section1D); }
public FetchConfigurationCommand(IntegrationAction action, IntegrationType type, Frequency frequency) { Type = type; Action = action; Frequency = frequency; }
public void Update(IntegrationType entity) { var entityIndex = _fakeIntegrationTypes.IndexOf(entity); _fakeIntegrationTypes[entityIndex] = entity; }
/// <summary> /// Generate the necessary parameters /// </summary> public List <KeyValuePair <string, string> > GetParams() { var p = new List <KeyValuePair <string, string> >(); if (FriendlyName != null) { p.Add(new KeyValuePair <string, string>("FriendlyName", FriendlyName)); } if (ChatServiceSid != null) { p.Add(new KeyValuePair <string, string>("ChatServiceSid", ChatServiceSid.ToString())); } if (ChannelType != null) { p.Add(new KeyValuePair <string, string>("ChannelType", ChannelType.ToString())); } if (ContactIdentity != null) { p.Add(new KeyValuePair <string, string>("ContactIdentity", ContactIdentity)); } if (Enabled != null) { p.Add(new KeyValuePair <string, string>("Enabled", Enabled.Value.ToString().ToLower())); } if (IntegrationType != null) { p.Add(new KeyValuePair <string, string>("IntegrationType", IntegrationType.ToString())); } if (IntegrationFlowSid != null) { p.Add(new KeyValuePair <string, string>("Integration.FlowSid", IntegrationFlowSid.ToString())); } if (IntegrationUrl != null) { p.Add(new KeyValuePair <string, string>("Integration.Url", Serializers.Url(IntegrationUrl))); } if (IntegrationWorkspaceSid != null) { p.Add(new KeyValuePair <string, string>("Integration.WorkspaceSid", IntegrationWorkspaceSid.ToString())); } if (IntegrationWorkflowSid != null) { p.Add(new KeyValuePair <string, string>("Integration.WorkflowSid", IntegrationWorkflowSid.ToString())); } if (IntegrationChannel != null) { p.Add(new KeyValuePair <string, string>("Integration.Channel", IntegrationChannel)); } if (IntegrationTimeout != null) { p.Add(new KeyValuePair <string, string>("Integration.Timeout", IntegrationTimeout.ToString())); } if (IntegrationPriority != null) { p.Add(new KeyValuePair <string, string>("Integration.Priority", IntegrationPriority.ToString())); } if (IntegrationCreationOnMessage != null) { p.Add(new KeyValuePair <string, string>("Integration.CreationOnMessage", IntegrationCreationOnMessage.Value.ToString().ToLower())); } if (LongLived != null) { p.Add(new KeyValuePair <string, string>("LongLived", LongLived.Value.ToString().ToLower())); } if (JanitorEnabled != null) { p.Add(new KeyValuePair <string, string>("JanitorEnabled", JanitorEnabled.Value.ToString().ToLower())); } if (IntegrationRetryCount != null) { p.Add(new KeyValuePair <string, string>("Integration.RetryCount", IntegrationRetryCount.ToString())); } return(p); }
public void Add(IntegrationType entity) { entity.ID = GenerateIntegrationTypeId(); _fakeIntegrationTypes.Add(entity); }
public void Delete(IntegrationType entity) { var integrationType = _fakeIntegrationTypes.Single(p => p.ID == entity.ID); _fakeIntegrationTypes.Remove(integrationType); }
public Logs(IntegrationType integrationType, int orgId) { this._organizationId = orgId; this._integration = integrationType; InitializeIntegrationLog(); }
/// <summary> /// Gets the specified authorizer. /// </summary> /// <param name="authorizer">The authorizer.</param> /// <param name="conversationId">The conversation identifier.</param> /// <param name="lastEventId">The last event identifier.</param> /// <param name="type">The type.</param> /// <returns></returns> public ApiResponse <IEnumerable <DirectActivityModel> > Get(IHubsterAuthorizer authorizer, Guid conversationId, long lastEventId, IntegrationType type) { var apiResponse = _engineAccess.Get(authorizer, conversationId, lastEventId, type); return(apiResponse); }
public void Init() { instance = new IntegrationType(); }
public bool IsValidForIntegration(IntegrationType integrationType) { var isValidForIntegration = BirthDate.HasValue && Gender.HasValue && PassportIssueDate.HasValue && PassportExpiryDate.HasValue; return(isValidForIntegration); }
private static void DisplaySceneImport( ref float currentHeight, string title, string description, AGF_LevelLoader.LoadSceneMode mode, IntegrationType currentIntegrationType ){ Rect thisRect = window.position; Color prevColor = GUI.color; // Title Text DisplayCenteredText( ref currentHeight, 15, title ); // Description Text DisplayWordWrappedCenteredText( ref currentHeight, 11, description, 400.0f ); float buttonWidth = 200.0f, buttonHeight = 20.0f; // step 1: instantiate integration prefab. GameObject agfIntegration = GameObject.Find ("AGF_Integration"); EditorGUI.HelpBox( new Rect( 20.0f, currentHeight, thisRect.width - (20.0f * 2.0f), 20.0f ), "Step 1: Instantiate the integration prefab.", MessageType.Info ); GUI.Toggle( new Rect( thisRect.width - 40.0f, currentHeight, 20.0f, 20.0f ), agfIntegration != null, "" ); currentHeight += 30.0f; if ( agfIntegration != null ){ GUI.color = Color.grey; } if ( GUI.Button ( new Rect( thisRect.width/2.0f - buttonWidth/2.0f, currentHeight, buttonWidth, buttonHeight ), "Instantiate Prefab" ) ){ if ( GUI.color != Color.grey ){ string path = "Assets/AGF_SceneLoader/AGF_Assets/Prefabs/AGF_Integration.prefab"; GameObject integrationPrefab = (GameObject)MonoBehaviour.Instantiate( (GameObject)AssetDatabase.LoadAssetAtPath( path, typeof(GameObject) ) ); integrationPrefab.name = "AGF_Integration"; } } GUI.color = prevColor; currentHeight += 32.0f; // step 2: Assign the camera link. GameObject cameraManager = GameObject.Find ("AGF_CameraManager"); bool isCameraConfigured = (cameraManager != null && IsCameraConfigured( cameraManager.GetComponent<AGF_CameraManager>().mainCamera ) ); EditorGUI.HelpBox( new Rect( 20.0f, currentHeight, thisRect.width - (20.0f * 2.0f), 20.0f ), "Step 2: Ensure that the main camera is properly configured.", MessageType.Info ); GUI.Toggle( new Rect( thisRect.width - 40.0f, currentHeight, 20.0f, 20.0f ), isCameraConfigured, "" ); currentHeight += 30.0f; DisplayCameraConfiguration( ref currentHeight ); // step 3: Load the scene if ( mode == AGF_LevelLoader.LoadSceneMode.All && currentIntegrationType == IntegrationType.Geovox){ EditorGUI.HelpBox( new Rect( 20.0f, currentHeight, thisRect.width - (20.0f * 2.0f), 20.0f ), "Step 3: Load the Geovox scene. The integration prefab will be destroyed.", MessageType.Info ); currentHeight += 30.0f; if ( GUI.Button ( new Rect( thisRect.width/2.0f - buttonWidth/2.0f, currentHeight, buttonWidth, buttonHeight ), "Load Geovox Scene" ) ){ int returnCode = LoadGeovoxScene(); if ( returnCode != AGF_ReturnCode.Success ){ Debug.LogError(returnCode); HandleLoadSceneError( returnCode ); } } } else if ( mode == AGF_LevelLoader.LoadSceneMode.CameraOnly ){ string integrationPrefix = currentIntegrationType.ToString(); EditorGUI.HelpBox( new Rect( 20.0f, currentHeight, thisRect.width - (20.0f * 2.0f), 30.0f ), "Step 3: Load the camera settings from an " + integrationPrefix +" scene. The integration prefab will be destroyed.", MessageType.Info ); currentHeight += 40.0f; if ( isCameraConfigured == false ){ GUI.color = Color.grey; } if ( GUI.Button ( new Rect( thisRect.width/2.0f - 250.0f/2.0f, currentHeight, 250.0f, buttonHeight ), "Load Camera Settings from " + integrationPrefix +" Scene" ) ){ if ( GUI.color != Color.grey ){ int returnCode = LoadCameraFromScene(); if ( returnCode != AGF_ReturnCode.Success ){ Debug.LogError(returnCode); HandleLoadSceneError( returnCode ); } } } } GUI.color = prevColor; currentHeight += 32.0f; }
protected CommunicationControllerBase(IntegrationType integrationType) { IntegrationType = integrationType; }
/// <summary> /// Establishes the conversation. /// </summary> /// <param name="authorizer">The authorizer.</param> /// <param name="conversationId">The conversation identifier.</param> /// <param name="lastEventId">The last event identifier.</param> /// <param name="type">The type.</param> /// <returns></returns> public ApiResponse <IEnumerable <DirectActivityModel> > Get(IHubsterAuthorizer authorizer, Guid conversationId, long lastEventId, IntegrationType type) { var apiResponse = new ApiResponse <IEnumerable <DirectActivityModel> >(); if (authorizer.EnsureLifespan(apiResponse) == false) { return(apiResponse); } var client = new RestClient(_hostUrl); var restRequest = new RestRequest($"/api/v1/interactions/activities/{conversationId}", Method.GET) { Timeout = 20000 }; restRequest.AddHeader("Content-Type", "application/json"); restRequest.AddHeader("Authorization", $"{authorizer.Token.TokenType} {authorizer.Token.AccessToken}"); restRequest.AddHeader("Origin", _origin); restRequest.AddParameter("leid", lastEventId); restRequest.AddParameter("type", type.ToString()); var restResponse = client.Execute(restRequest); apiResponse = ExtractResponse <IEnumerable <DirectActivityModel> >(restResponse); return(apiResponse); }
private void AssertIntegrationTypesEqual(IntegrationType expected, IntegrationType actual) { Assert.AreEqual(expected.ID, actual.ID); Assert.AreEqual(expected.Description, actual.Description); }
public Device(string id, DeviceType deviceType, IntegrationType integrationType) { Id = id; DeviceType = deviceType; IntegrationType = integrationType; }