PageRenderTime 41ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/Source/Bifrost/Configuration/IConfigure.cs

#
C# | 104 lines | 25 code | 14 blank | 65 comment | 0 complexity | 2fd30ef0d4ebd27b9e4c2e52fe1e1414 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. #region License
  2. //
  3. // Copyright (c) 2008-2012, DoLittle Studios and Komplett ASA
  4. //
  5. // Licensed under the Microsoft Permissive License (Ms-PL), Version 1.1 (the "License")
  6. // With one exception :
  7. // Commercial libraries that is based partly or fully on Bifrost and is sold commercially,
  8. // must obtain a commercial license.
  9. //
  10. // You may not use this file except in compliance with the License.
  11. // You may obtain a copy of the license at
  12. //
  13. // http://bifrost.codeplex.com/license
  14. //
  15. // Unless required by applicable law or agreed to in writing, software
  16. // distributed under the License is distributed on an "AS IS" BASIS,
  17. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18. // See the License for the specific language governing permissions and
  19. // limitations under the License.
  20. //
  21. #endregion
  22. using System;
  23. using System.Globalization;
  24. using Bifrost.Execution;
  25. namespace Bifrost.Configuration
  26. {
  27. /// <summary>
  28. /// Defines the configuration for Bifrost
  29. /// </summary>
  30. public interface IConfigure
  31. {
  32. /// <summary>
  33. /// Gets the type of logger to use
  34. /// </summary>
  35. Type LoggerType { get; }
  36. /// <summary>
  37. /// Gets the container that is used
  38. /// </summary>
  39. IContainer Container { get; }
  40. /// <summary>
  41. /// Gets the configuration for commands
  42. /// </summary>
  43. ICommandsConfiguration Commands { get; }
  44. /// <summary>
  45. /// Gets the configuration for events
  46. /// </summary>
  47. IEventsConfiguration Events { get; }
  48. /// <summary>
  49. /// Gets the configuration for views
  50. /// </summary>
  51. IViewsConfiguration Views { get; }
  52. /// <summary>
  53. /// Gets the convention manager for bindings
  54. /// </summary>
  55. IBindingConventionManager ConventionManager { get; }
  56. /// <summary>
  57. /// Gets the manager that manages applications
  58. /// </summary>
  59. IApplicationManager ApplicationManager { get; }
  60. /// <summary>
  61. /// Gets the current <see cref="IApplication"/>
  62. /// </summary>
  63. IApplication Application { get; }
  64. /// <summary>
  65. /// Gets the configuration for sagas
  66. /// </summary>
  67. ISagasConfiguration Sagas { get; }
  68. /// <summary>
  69. /// Gets or sets the <see cref="CultureInfo">culture</see> to use in Bifrost
  70. /// </summary>
  71. CultureInfo Culture { get; set; }
  72. /// <summary>
  73. /// Gets or sets the <see cref="CultureInfo">UI culture</see> to use in Bifrost
  74. /// </summary>
  75. CultureInfo UICulture { get; set; }
  76. /// <summary>
  77. /// Gets or sets the default <see cref="BindingLifeCycle"/> for objects when created/managed by the <see cref="IContainer"/>
  78. /// </summary>
  79. BindingLifecycle DefaultObjectLifecycle { get; }
  80. /// <summary>
  81. /// Sets a specific configuration source
  82. /// </summary>
  83. /// <param name="configurationSource"><see cref="IConfigurationSource"/> to set</param>
  84. void ConfigurationSource(IConfigurationSource configurationSource);
  85. /// <summary>
  86. /// Initializes Bifrost after configuration
  87. /// </summary>
  88. void Initialize();
  89. }
  90. }