public ShapeProvider(Func<MessageInfo,bool> match, IServices services) { if (match == null) throw new ArgumentNullException("match"); _match = match; _services = services; }
public Manager(V1Instance v1, ISmtpAdapter smtpAdapter, IUserDirectoryReader ldapreader) { _services = v1.Services; _model = v1.Model; _defaultRole = v1.DefaultRole; _smtpAdapter = smtpAdapter; _directoryReader = ldapreader; }
/// <summary> /// Create connection to V1 server. /// </summary> /// <param name="settings">Connection settings</param> public void Connect(VersionOneSettings settings) { var url = settings.ApplicationUrl; var accessToken = settings.AccessToken; try { var connector = SDK.APIClient.V1Connector .WithInstanceUrl(url) .WithUserAgentHeader("VersionOne.Integration.JIRASync", Assembly.GetEntryAssembly().GetName().Version.ToString()); ICanSetProxyOrEndpointOrGetConnector connectorWithAuth; connectorWithAuth = connector.WithAccessToken(accessToken); if (settings.ProxySettings.Enabled) connectorWithAuth.WithProxy(GetProxy(settings.ProxySettings)); services = new Services(connectorWithAuth.Build()); if (!services.LoggedIn.IsNull) { IsConnected = true; ListPropertyValues = new Dictionary<string, IList<ListValue>>(); } else IsConnected = false; } catch (Exception) { IsConnected = false; } }
public PlayPanel(Transform content, IServices services) { go = content.gameObject; levelsContent = getChild("Viewport/Content"); this.services = services; createLevels(); }
public Login() { InitializeComponent(); IsSuccessLogin = false; _services = new WinServices(typeof(User).Name); }
public static string UploadFileToS3(IServices services, string fileName, Stream file, string folderName) { string s3FilePath = string.Empty; if (file != null) { byte[] bFile = null; MemoryStream memoryStream = new MemoryStream(); try { file.CopyTo(memoryStream); bFile = memoryStream.ToArray(); s3FilePath = services.Image.SaveImage(fileName, bFile, folderName); } catch (Exception ex) { Log.Error("FileHelper_UploadFileToS3_error: " + fileName, ex); } finally { memoryStream.Close(); memoryStream.Dispose(); } } file.Close(); file.Dispose(); return s3FilePath; }
// // GET: /Account/Login public AccountController(IServices services, ISettings settings, IComponents components, IUserStore<ApplicationUser, Guid> userStore) : base(services, settings) { _userManager = new ApplicationUserManager(userStore, services, components); Mapper.CreateMap<ApplicationUser, UserDto>(); }
public ShopPanel(Transform content, IServices services) { go = content.gameObject; this.services = services; setReferences(); createElements(); }
public void Setup(IServices services, IMetaModel metaModel, ILocalizer localizer) { this.services = services; this.metaModel = metaModel; this.localizer = localizer; TypeResolver.Reset(); ListPropertyValues = GetListPropertyValues(); }
public TopPanelComponent(IServices services) { this.services = services; init(); showYPosition = go.transform.localPosition.y; go.SetActive(false); }
private ServicesProvider() { if (TechnicalSettings.UseOnlineMode) _iServices = Remoting.GetInstance(); else _iServices = new Standard(); }
public ShopElement(Transform transform, IServices services, ShopModel model) { go = transform.gameObject; this.services = services; this.model = model; setReferences(); setTexts(); }
public void Setup() { var environment = new EnvironmentContext(); _metaModel = environment.MetaModel; _services = environment.Services; _storyAssetType = _metaModel.GetAssetType("Story"); _projectId = LegacyIntegrationTestHelper.ProjectId; }
private static void Setup() { _context = new EnvironmentContext(); _metaModel = _context.MetaModel; _services = _context.Services; CreateTestProject(); }
public ShipPanel(Transform content, IServices services) { go = content.gameObject; this.services = services; shipContent = getChild("Viewport/Content"); infoContent = getChild("Panel/Text"); setData(); }
public void Initialize() { var connector = new V1Central(Enviornment.instance.GetVersionOneConfiguration()); connector.Validate(); services = connector.Services; metaModel = connector.MetaModel; queryBuilder.Setup(services, metaModel, connector.Loc); }
//public static bool IsSpecialistStandardHour(int specialistID, DateTime startTime, DateTime endTime, IServices service) //{ // bool isStandardHour = false; // isStandardHour = service.StandardHour.IsStandardHour(specialistID, startTime, endTime); // return isStandardHour; //} /// <summary> /// calculate fee for customer and speclist when book time or reschedule /// </summary> /// <param name="specialistId"></param> /// <param name="IsSpecialist"></param> /// <param name="startTime"></param> /// <param name="endTime"></param> /// <param name="service"></param> /// <param name="specializationId"></param> /// <returns></returns> public static decimal GetbookingRateByBookDate(Guid bookingId, UserDto specialist, bool IsSpecialist, DateTime startTime, DateTime endTime, IServices services) { decimal rate = 0; //TODO: will use function check standardhour when branch 226369 merged bool isStandardHour = services.Users.IsStandardHour(specialist.Id, startTime, endTime); return rate; }
public void TestFixtureSetUp() { var metaConnector = new VersionOneAPIConnector(V1Url + MetaUrl).WithVersionOneUsernameAndPassword(Username, Password); var serviceConnector = new VersionOneAPIConnector(V1Url + DataUrl).WithVersionOneUsernameAndPassword(Username, Password); MetaModel = new MetaModel(metaConnector); Services = new Services(MetaModel, serviceConnector); var doc = new XmlDocument(); doc.LoadXml(string.Format(@"<Settings> <APIVersion></APIVersion> <ApplicationUrl>{0}</ApplicationUrl> <Username>{1}</Username> <Password>{2}</Password> <IntegratedAuth>false</IntegratedAuth> <ProxySettings disabled='1'> <Uri>http://proxyhost:3128</Uri> <UserName>username</UserName> <Password>password</Password> <Domain>domain</Domain> </ProxySettings> </Settings>", V1Url, Username, Password)); var loggerMock = MockRepository.Stub<ILogger>(); V1Processor = new VersionOneProcessor(doc["Settings"], loggerMock); V1Processor.AddProperty(Workitem.NumberProperty, VersionOneProcessor.PrimaryWorkitemType, false); V1Processor.AddProperty(Entity.NameProperty, VersionOneProcessor.PrimaryWorkitemType, false); V1Processor.AddProperty(Entity.DescriptionProperty, VersionOneProcessor.PrimaryWorkitemType, false); V1Processor.AddProperty(Workitem.PriorityProperty, VersionOneProcessor.PrimaryWorkitemType, true); V1Processor.AddProperty(Entity.StatusProperty, VersionOneProcessor.PrimaryWorkitemType, false); V1Processor.AddProperty(Workitem.EstimateProperty, VersionOneProcessor.PrimaryWorkitemType, false); V1Processor.AddProperty(Entity.AssetTypeProperty, VersionOneProcessor.PrimaryWorkitemType, false); V1Processor.AddProperty(PrimaryWorkitem.ParentNameProperty, VersionOneProcessor.PrimaryWorkitemType, false); V1Processor.AddProperty(PrimaryWorkitem.TeamNameProperty, VersionOneProcessor.PrimaryWorkitemType, false); V1Processor.AddProperty(PrimaryWorkitem.SprintNameProperty, VersionOneProcessor.PrimaryWorkitemType, false); V1Processor.AddProperty(PrimaryWorkitem.OrderProperty, VersionOneProcessor.PrimaryWorkitemType, false); V1Processor.AddProperty(BaseEntity.ReferenceProperty, VersionOneProcessor.PrimaryWorkitemType, false); V1Processor.AddProperty(Entity.NameProperty, VersionOneProcessor.StoryType, false); V1Processor.AddProperty(Entity.NameProperty, VersionOneProcessor.FeatureGroupType, false); V1Processor.AddProperty(BaseEntity.ReferenceProperty, VersionOneProcessor.FeatureGroupType, false); V1Processor.AddProperty(VersionOneProcessor.OwnersAttribute, VersionOneProcessor.FeatureGroupType, false); V1Processor.AddProperty(FieldInfo.NameProperty, VersionOneProcessor.AttributeDefinitionType, false); V1Processor.AddProperty(FieldInfo.AssetTypeProperty, VersionOneProcessor.AttributeDefinitionType, false); V1Processor.AddProperty(FieldInfo.AttributeTypeProperty, VersionOneProcessor.AttributeDefinitionType, false); V1Processor.AddProperty(FieldInfo.IsReadOnlyProperty, VersionOneProcessor.AttributeDefinitionType, false); V1Processor.AddProperty(FieldInfo.IsRequiredProperty, VersionOneProcessor.AttributeDefinitionType, false); V1Processor.AddProperty(Entity.NameProperty, VersionOneProcessor.LinkType, false); V1Processor.AddProperty(Link.UrlProperty, VersionOneProcessor.LinkType, false); V1Processor.AddProperty(Link.OnMenuProperty, VersionOneProcessor.LinkType, false); V1Processor.AddProperty(Entity.NameProperty, VersionOneProcessor.MemberType, false); V1Processor.AddProperty(Member.EmailProperty, VersionOneProcessor.MemberType, false); V1Processor.AddProperty(Member.DefaultRoleNameProperty, VersionOneProcessor.MemberType, false); V1Processor.AddProperty(Workitem.OwnersProperty, VersionOneProcessor.StoryType, false); V1Processor.AddProperty(Workitem.OwnersProperty, VersionOneProcessor.DefectType, false); V1Processor.AddProperty(Workitem.OwnersProperty, VersionOneProcessor.PrimaryWorkitemType, false); Assert.IsTrue(V1Processor.ValidateConnection(), "Connection is not valid"); }
public override void Load(IServices services) { System.Windows.Forms.Application.EnableVisualStyles(); System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); AddShortcut(ModifierKeys.Control, Key.OemPlus, () => m_functions.AlignByKey()); AddShortcut(ModifierKeys.Control | ModifierKeys.Shift, Key.OemPlus, () => m_functions.AlignByDialog()); base.Load(services); }
public IntegrationController(IUserStore<ApplicationUser,Guid> userStore, IAdminServices adminServices, IServices services, ISettings settings, IComponents components) : base(services, settings) { //if(!(settings.Environment == Environment.Integration || settings.Environment == Environment.Debug)) // throw new SecurityException(); _adminServices = adminServices; _userManager = new ApplicationUserManager(userStore, services, components); }
public void SetUp() { var logger = _repository.Stub<ILogger>(); _mockServices = _repository.StrictMock<IServices>(); _mockMetaModel = _repository.StrictMock<IMetaModel>(); _mockQueryBuilder = _repository.StrictMock<IQueryBuilder>(); _processor = new TestVersionOneProcessor(null, logger); _processor.ConnectTest(_mockServices, _mockMetaModel, _mockQueryBuilder); }
protected ViewModelBase(IServices services) { Services = services; Log = Services.Log; if (!IsInDesignMode) { WireMessages(); } }
public static void Initialize(TestContext context) { Context = context; Configure(Context); ConfigureRoute(Context, "/meta.v1//", MetaSamplePayloads.FullSubset); var connector = CreateConnector(); SUT = new Services(connector, true); // preLoadMeta = true!S AssetTypeType = SUT.Meta.GetAssetType("AssetType"); PrimaryRelationType = SUT.Meta.GetAssetType("PrimaryRelation"); }
private ServicesProvider() { // Remove remoting version and change the standard IServices Implementation _iServices = new OnlineServiceProvider(); /* if (TechnicalSettings.UseOnlineMode) _iServices = Remoting.GetInstance(); else _iServices = new Standard(); */ }
internal RequiredFieldsValidator(IMetaModel metaModel, IServices services, IDataLayerInternal dataLayer) { this.metaModel = metaModel; this.services = services; this.dataLayer = dataLayer; logger = dataLayer.Logger; requiredFieldsList.Add(Entity.TaskType, GetRequiredFields(Entity.TaskType)); requiredFieldsList.Add(Entity.DefectType, GetRequiredFields(Entity.DefectType)); requiredFieldsList.Add(Entity.StoryType, GetRequiredFields(Entity.StoryType)); requiredFieldsList.Add(Entity.TestType, GetRequiredFields(Entity.TestType)); }
public static void CreateTransaction(BookingDto booking, decimal amount, bool minimumCharge, IServices Services) { try { UserDto user = Services.Users.GetUserById(booking.Customer.Id); if (user != null) { InvoiceDto consultationInvoice; switch (user.PaymentMethod) { case PaymentMethod.CreditCard: PaymentResult result = new PaymentResult(); if (amount != 0) { result = Services.Payment.Transaction(user.Id.ToString(), amount); if (result.Success) { consultationInvoice = Services.Invoices.CreateConsultationInvoice(amount, booking.Id, minimumCharge, true, result.Transaction.Id); } else { Log.Error("Transaction fail. Message: " + result.ErrorMessage + " UserId: " + user.Id); CreateUnsuccessInvoice(user, booking, Services, amount); } } break; case PaymentMethod.PrePayment: user.PrePaymentAmount -= amount; if (Services.Users.UpdateUserInfo(user)) { consultationInvoice = Services.Invoices.CreateConsultationInvoice(amount, booking.Id, minimumCharge, true, null); } else { CreateUnsuccessInvoice(user, booking, Services, amount); } break; default: break; } } } catch (Exception e) { Log.Error("Create new transaction with UserId: " + booking.Customer.Id + " BookingId: " + booking.Id, e); } }
private string VoiceInConference = "man"; // Default value #endregion Fields #region Constructors public ConferenceController(IServices services) { Services = services; // Get setting for voice and language in conference var voiceConfig = Services.SystemConfig.GetByKey(ParamatricBusinessRules.VOICE_IN_CONFERENCE.ToString()); var languageConfig = Services.SystemConfig.GetByKey(ParamatricBusinessRules.LANGUAGE_IN_CONFERENCE.ToString()); if (voiceConfig != null && languageConfig != null) { VoiceInConference = voiceConfig.Value; LanguageInConference = languageConfig.Value; } }
public static void Initialize(TestContext context) { Context = context; Configure(Context); ConfigureRoute(Context, "/meta.v1//AssetType", MetaSamplePayloads.AssetTypeType); ConfigureRoute(Context, "/meta.v1//PrimaryRelation", MetaSamplePayloads.PrimaryRelationType); var connector = CreateConnector(); SUT = new Services(connector); AssetTypeType = SUT.Meta.GetAssetType("AssetType"); PrimaryRelationType = SUT.Meta.GetAssetType("PrimaryRelation"); }
public void Init(IServices services) { services.EventService.AddListener<GameEndedEvent>(onGameEnded); pool.CreateEntity() .AddEventService(services.EventService) .AddUIFactoryService(services.UIFactoryService) .AddAnalyticsService(services.AnalyticsService) .AddTranslationService(services.TranslationService) .AddCanvas(services.ViewService.Canvas); systems.Initialize(); services.Updateables.Add(this); }
public void TestFixtureSetup() { string username = ConfigurationManager.AppSettings["V1UserName"]; string password = ConfigurationManager.AppSettings["V1Password"]; string metaUrl = ConfigurationManager.AppSettings["V1Url"] + "meta.v1/"; string dataUrl = ConfigurationManager.AppSettings["V1Url"] + "rest-1.v1/"; var metaConnector = new VersionOneAPIConnector(metaUrl); var dataConnector = new VersionOneAPIConnector(dataUrl) .WithVersionOneUsernameAndPassword(username, password); _metaModel = new MetaModel(metaConnector); _services = new Services(_metaModel, dataConnector); }
public override void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services) => sw.Format(formatterContext, services) .Property(nameof(FieldObject.Model)) .Property(nameof(FieldObjectInteraction.IsPushScriptActive)) .Assign(false) .Comment(nameof(PUSHOFF));
public ForumController(IServices services) { this.services = services; }
public static ILogicalExpression LogicalEvaluate(this ILogicalExpression expression, IServices services) { IJsmExpression jsm = expression.Evaluate(services); return((ILogicalExpression)jsm); }
public override IAwaitable TestExecute(IServices services) { ServiceId.Salary[services].IsSalaryEnabled = true; return(DummyAwaitable.Instance); }
public override void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services) { sw.Format(formatterContext, services) .StaticType(nameof(IGameplayService)) .Property(nameof(IGameplayService.IsRandomBattlesEnabled)) .Assign(false) .Comment(nameof(BATTLEOFF)); }
public void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services) { sw.Append("("); _first.Format(sw, formatterContext, services); sw.Append(" & "); _last.Format(sw, formatterContext, services); sw.Append(")"); }
public ClientController(IServices <Client> ServicoCliente, IServices <Adress> ServicoAdress) { _ServicoCliente = ServicoCliente; _ServicoAdress = ServicoAdress; }
void ICommand <IServices> .Execute(IServices parameter) { _composers.Execute(parameter); }
public override IAwaitable TestExecute(IServices services) => ServiceId.Field[services].Engine.CurrentObject.Animation.Wait();
public override void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services) => sw.Format(formatterContext, services) .Await() .Property(nameof(FieldObject.Animation)) .Method(nameof(FieldObjectAnimation.Wait)) .Comment(nameof(AnimeSync));
public static Int32 Int32(this IJsmExpression expression, IServices services) { return(checked ((Int32)expression.Calculate(services))); }
public long Calculate(IServices services) => _first.Calculate(services) != _last.Calculate(services) ? 1 : 0;
public long Calculate(IServices services) => _first.Calculate(services) & _last.Calculate(services);
public TheRecipe(IServices services, IViews views, Transform parent) : base(services, views, parent) { }
public HomeController(IServices services) : base(services) { }
public void FormatType(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices executionContext) { formatterContext.GetObjectScriptNamesById(Id, out String typeName, out _); sw.AppendLine($"public sealed class {typeName}"); { sw.AppendLine("{"); sw.Indent++; if (Scripts.Count > 0) { FormatConstructor(typeName, sw, formatterContext, executionContext); foreach (var script in Scripts.Skip(1)) { sw.AppendLine(); script.FormatMethod(sw, formatterContext, executionContext); } } sw.Indent--; sw.AppendLine("}"); } }
public AppConfig(AppSettings appSettings, IConsole console, IDependencyResolver dependencyResolver, IHelpProvider helpProvider, NameTransformation nameTransformation, Action <OnRunCompletedEventArgs> onRunCompleted, TokenizationEvents tokenizationEvents, BuildEvents buildEvents, IServices services, CancellationToken cancellationToken, Dictionary <Type, Func <CommandContext, object> > parameterResolversByType) { AppSettings = appSettings; Console = console; DependencyResolver = dependencyResolver; HelpProvider = helpProvider; NameTransformation = nameTransformation ?? ((attributes, memberName, overrideName, commandNodeType) => overrideName ?? memberName); OnRunCompleted = onRunCompleted; TokenizationEvents = tokenizationEvents; BuildEvents = buildEvents; Services = services; CancellationToken = cancellationToken; ParameterResolversByType = parameterResolversByType; ResolverService = services.GetOrAdd(() => new ResolverService()); ResolverService.BackingResolver = dependencyResolver; OnRunCompleted += args => ResolverService.OnRunCompleted(args.CommandContext); }
public override void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services) { sw.Format(formatterContext, services) .StaticType(nameof(IFieldService)) .Method(nameof(IFieldService.FadeOut)) .Comment(nameof(FADEOUT)); }
public override void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services) { sw.Format(formatterContext, services) .StaticType(nameof(IRenderingService)) .Method(nameof(IRenderingService.AnimateBackground)) .Argument("lastFrame", _lastFrame) .Argument("firstFrame", _firstFrame) .Comment(nameof(BGANIME)); }
private void FormatConstructor(String typeName, ScriptWriter sw, IScriptFormatterContext formatterContext, IServices executionContext) { sw.AppendLine($"private readonly {nameof(IServices)} _ctx;"); sw.AppendLine(); sw.AppendLine($"public {typeName}({nameof(IServices)} executionContext)"); { sw.AppendLine("{"); sw.Indent++; sw.AppendLine("_ctx = executionContext;"); Scripts[0].FormatMethodBody(sw, formatterContext, executionContext); sw.Indent--; sw.AppendLine("}"); } }
public override void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services) { sw.Format(formatterContext, services) .StaticType(nameof(ISalaryService)) .Property(nameof(ISalaryService.IsSalaryEnabled)) .Assign(true) .Comment(nameof(SARALYON)); }
public BrandsController(IServices services) : base(services) { }
public override IAwaitable TestExecute(IServices services) { ServiceId.Field[services].FadeOut(); return(DummyAwaitable.Instance); }
public override IAwaitable TestExecute(IServices services) { ServiceId.Gameplay[services].IsRandomBattlesEnabled = false; return(DummyAwaitable.Instance); }
public AllNewsViewModel(IServices services) { this.services = services; ResultPanelVisibility = false; LoginPanelVisibility = true; }
protected HideableElement(IServices services, IViews views, Transform parent) : base(services, views, parent) { }
public CompanyController(IServices <Address> addressServices, IServices <CompanyAddress> companyAddressServices, IServices <UserSetting> userSettingServices, IServices <Contact> contactervices, IServices <Smart.Core.Domain.Files.File> fileServices, IServices <CompanyFile> companyFileServices, IServices <Smart.Core.Domain.Tasks.Task> taskServices, IServices <TaskGroup> taskGroupServices, IServices <CompanyNote> companyNoteServices, IServices <Note> noteServices, IServices <Company> companyServices, IUser currentUser, IServices <UserSetting> currentSetting, IEmailSender emailSender, ISmsSender smsSender, IHttpContextAccessor accessor ) : base(currentUser, currentSetting, emailSender, smsSender, accessor) { this._companyServices = companyServices; this._noteServices = noteServices; this._companyNoteServices = companyNoteServices; this._taskGroupServices = taskGroupServices; this._taskServices = taskServices; this._companyFileServices = companyFileServices; this._fileServices = fileServices; this._contactervices = contactervices; this._userSettingServices = userSettingServices; this._companyAddressServices = companyAddressServices; this._addressServices = addressServices; }
public override void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services) { sw.Format(formatterContext, services) .Property(nameof(FieldObject.Model)) .Property(nameof(FieldObjectInteraction.SoundFootsteps)) .Assign(false) .Comment(nameof(FOOTSTEPOFF)); }
public GameStateSystems(Contexts contexts, IServices services) { Add(new InitStateSystem(contexts)); Add(new GameStateRestartSystem(contexts)); }
public override void Format(ScriptWriter sw, IScriptFormatterContext formatterContext, IServices services) { sw.Format(formatterContext, services) .StaticType(nameof(IMusicService)) .Method(nameof(IMusicService.ChangeMusicVolume)) .Argument("volume", _volume) .Argument("flag", _flag) .Comment(nameof(MUSICVOL)); }