本文整理汇总了C#中ISettingsRepository类的典型用法代码示例。如果您正苦于以下问题:C# ISettingsRepository类的具体用法?C# ISettingsRepository怎么用?C# ISettingsRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISettingsRepository类属于命名空间,在下文中一共展示了ISettingsRepository类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SettingsController
public SettingsController(ISettingsViewModelBuilder settingsViewModelBuilder, IAuditLogViewModelBuilder auditLogViewModelBuilder, ISettingsRepository settingsRepository, IAgrimanagrSettingsViewModelBuilder agrimanagrSettingsViewModelBuilder)
{
_settingsViewModelBuilder = settingsViewModelBuilder;
_auditLogViewModelBuilder = auditLogViewModelBuilder;
_settingsRepository = settingsRepository;
_agrimanagrSettingsViewModelBuilder = agrimanagrSettingsViewModelBuilder;
}
开发者ID:asanyaga,项目名称:BuildTest,代码行数:7,代码来源:SettingsController.cs
示例2: MarkupConverter
/// <summary>
/// Creates a new markdown parser which handles the image and link parsing by the various different
/// markdown format parsers.
/// </summary>
/// <returns>An <see cref="IMarkupParser"/> for Creole,Markdown or Media wiki formats.</returns>
public MarkupConverter(ApplicationSettings settings, ISettingsRepository settingsRepository, IPageRepository pageRepository, IPluginFactory pluginFactory)
{
_externalLinkPrefixes = new List<string>()
{
"http://",
"https://",
"www.",
"mailto:",
"#",
"tag:"
};
_pluginFactory = pluginFactory;
_settingsRepository = settingsRepository;
_pageRepository = pageRepository;
_applicationSettings = settings;
// Create the UrlResolver for all wiki urls
HttpContextBase httpContext = null;
if (HttpContext.Current != null)
httpContext = new HttpContextWrapper(HttpContext.Current);
UrlResolver = new UrlResolver(httpContext);
if (!_applicationSettings.Installed)
{
// Skip the chain of creation, as the markup converter isn't needed but is created by
// StructureMap - this is required for installation
return;
}
CreateParserForMarkupType();
}
开发者ID:RyanGroom,项目名称:roadkill,代码行数:38,代码来源:MarkupConverter.cs
示例3: MainViewModel
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
public MainViewModel()
{
try
{
random = new Random();
_sync = new object();
_client = SimpleIoc.Default.GetInstance<IClient>();
_settingsRepository = SimpleIoc.Default.GetInstance<ISettingsRepository>();
apiExt = _client.GetAPIExtension(null);
CallCommand = new RelayCommand<string>(CallPressed,
phoneNumber => !string.IsNullOrEmpty(UsedPhoneNumber) && !string.IsNullOrEmpty(phoneNumber));
_internalPhoneBookItems = new List<PhoneBookItem>();
PhoneBookItems = CollectionViewSource.GetDefaultView(_internalPhoneBookItems);
_client.PhoneBookChanged += OnPhoneBookChanged;
_client.SessionCreated += ClientOnSessionCreated;
_client.ErrorOccurred += ClientOnErrorOccurred;
_client.GetPhoneBook();
}
catch (Exception ex)
{
}
}
开发者ID:BertaAndras,项目名称:secret-sensa,代码行数:30,代码来源:MainViewModel.cs
示例4: SettingsViewModelBase
protected SettingsViewModelBase(ISettingsRepository settingsRepository, IStorageService storageService)
{
_settingsRepository = settingsRepository;
_storageService = storageService;
if (!IsInDesignMode)
Initialize();
else
{
Name = "DesignName";
Colors = new ObservableCollection<Color>()
{
new Color("F44336", "Red"),
new Color("E91E63", "Pink"),
new Color("9C27B0", "Purple"),
new Color("673AB7", "Deep Purple"),
new Color("F44336", "Red"),
new Color("E91E63", "Pink"),
new Color("9C27B0", "Purple"),
new Color("673AB7", "Deep Purple"),
new Color("F44336", "Red"),
new Color("E91E63", "Pink"),
new Color("9C27B0", "Purple"),
new Color("673AB7", "Deep Purple")
};
SelectedColor = Colors[2];
}
}
开发者ID:famoser,项目名称:BeerCompanion,代码行数:28,代码来源:SettingsViewModelBase.cs
示例5: FileViewModel
public FileViewModel(ISettingsRepository settings, ProgressTracker tracker, IPropertyChangedInvoke invoker)
: this()
{
Settings = settings;
ProgressTracker = tracker;
Invoker = invoker;
}
开发者ID:jbouwens,项目名称:Put.io.Wp,代码行数:7,代码来源:FileViewModel.cs
示例6: MenuParser
public MenuParser(MarkupConverter markupConverter, ISettingsRepository settingsRepository, SiteCache siteCache, IUserContext userContext)
{
_markupConverter = markupConverter;
_settingsRepository = settingsRepository;
_siteCache = siteCache;
_userContext = userContext;
}
开发者ID:RyanGroom,项目名称:roadkill,代码行数:7,代码来源:MenuParser.cs
示例7: SettingsController
public SettingsController(ISettingsRepository repository)
{
if (!WebUtils.CheckRightsForAdminSettingsPage(true))
throw new HttpResponseException(HttpStatusCode.Unauthorized);
this.repository = repository;
}
开发者ID:aelagawy,项目名称:BlogEngine.NET,代码行数:7,代码来源:SettingsController.cs
示例8: MainViewModel
public MainViewModel(ISettingsRepository settingsRepository, IBeerRepository beerRepository, IInteractionService interactionService, IDrinkerCycleRepository drinkerCycleRepository, IHistoryNavigationService navigationService, IProgressService progressService)
{
_settingsRepository = settingsRepository;
_beerRepository = beerRepository;
_interactionService = interactionService;
_drinkerCycleRepository = drinkerCycleRepository;
_navigationService = navigationService;
_progressService = progressService;
_addBeer = new RelayCommand(AddBeer);
_removeBeer = new RelayCommand(RemoveBeer, () => CanRemoveBeer);
_addGroup = new RelayCommand(AddGroup, () => CanAddGroup);
_refreshCommand = new RelayCommand(Refresh, () => CanRefresh);
_openSettingsCommand = new RelayCommand(OpenSettings);
Messenger.Default.Register<Messages>(this, EvaluateMessages);
if (IsInDesignMode)
{
DrinkerCycles = _drinkerCycleRepository.GetSampleCycles();
UserInformation = settingsRepository.GetSampleUserInformations();
}
else
{
Initialize();
}
}
开发者ID:famoser,项目名称:BeerCompanion,代码行数:28,代码来源:MainViewModel.cs
示例9: WikiExporter
public WikiExporter(ApplicationSettings applicationSettings, PageService pageService, ISettingsRepository settingsRepository, IPageRepository pageRepository, IUserRepository userRepository, IPluginFactory pluginFactory)
{
if (applicationSettings == null)
throw new ArgumentNullException(nameof(applicationSettings));
if (pageService == null)
throw new ArgumentNullException(nameof(pageService));
if (settingsRepository == null)
throw new ArgumentNullException(nameof(settingsRepository));
if (pageRepository == null)
throw new ArgumentNullException(nameof(pageRepository));
if (userRepository == null)
throw new ArgumentNullException(nameof(userRepository));
if (pluginFactory == null)
throw new ArgumentNullException(nameof(pluginFactory));
_applicationSettings = applicationSettings;
_pageService = pageService;
_sqlExportBuilder = new SqlExportBuilder(settingsRepository, userRepository, pageRepository, pluginFactory);
ExportFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data", "Export");
}
开发者ID:RyanGroom,项目名称:roadkill,代码行数:26,代码来源:WikiExporter.cs
示例10: BaseService
public BaseService(
IApplicationSettingsProvider applicationSettingsProvider,
ISettingsRepository settingsRepository)
{
_applicationSettingsProvider = applicationSettingsProvider;
_settingsRepository = settingsRepository;
}
开发者ID:G-Rad,项目名称:nzblog,代码行数:7,代码来源:BaseService.cs
示例11: IdeaController
public IdeaController(IIdeaRepository ideas, IUserRepository users, ISettingsRepository settings, IImageRepository imageRepository, IFeatureRepository features)
{
_ideas = ideas;
_users = users;
_settings = settings;
_features = features;
}
开发者ID:seancaffery,项目名称:thoughtstrike,代码行数:7,代码来源:IdeaController.cs
示例12: ToModelList
public static List<FileViewModel> ToModelList(this FileList @this, IPropertyChangedInvoke invoker, ISettingsRepository settings, ProgressTracker tracker)
{
if (@this == null || @this.files == null)
return new List<FileViewModel>();
return @this.files.Select(x => new FileViewModel(settings, tracker, invoker) { File = x.ToModel() }).ToList();
}
开发者ID:jbouwens,项目名称:Put.io.Wp,代码行数:7,代码来源:ApiExtensions.cs
示例13: UpkManagerController
public UpkManagerController(UpkManagerViewModel ViewModel, MainMenuViewModel MenuViewModel, IMessenger Messenger, ISettingsRepository SettingsRepository, IExceptionRepository ExceptionRepository, IMapper Mapper) {
if (Application.Current != null) Application.Current.DispatcherUnhandledException += onCurrentDispatcherUnhandledException;
AppDomain.CurrentDomain.UnhandledException += onDomainUnhandledException;
Dispatcher.CurrentDispatcher.UnhandledException += onCurrentDispatcherUnhandledException;
TaskScheduler.UnobservedTaskException += onUnobservedTaskException;
System.Windows.Forms.Application.ThreadException += onThreadException;
viewModel = ViewModel;
menuViewModel = MenuViewModel;
messenger = Messenger;
settingsRepository = SettingsRepository;
exceptionRepository = ExceptionRepository;
mapper = Mapper;
settings = Task.Run(() => settingsRepository.LoadSettingsAsync()).Result;
viewModel.Settings = mapper.Map<SettingsWindowViewEntity>(settings);
registerMessages();
registerCommands();
}
开发者ID:stricq,项目名称:UPKManager,代码行数:28,代码来源:UpkManagerController.cs
示例14: MembershipService
/// <summary>
/// Constructor
/// </summary>
/// <param name="membershipRepository"> </param>
/// <param name="settingsRepository"> </param>
/// <param name="emailService"> </param>
/// <param name="localizationService"> </param>
/// <param name="activityService"> </param>
/// <param name="privateMessageService"> </param>
/// <param name="membershipUserPointsService"> </param>
/// <param name="topicNotificationService"> </param>
/// <param name="voteService"> </param>
/// <param name="badgeService"> </param>
/// <param name="categoryNotificationService"> </param>
/// <param name="loggingService"></param>
/// <param name="uploadedFileService"></param>
/// <param name="postRepository"></param>
/// <param name="pollVoteRepository"></param>
/// <param name="pollAnswerRepository"></param>
/// <param name="pollRepository"></param>
/// <param name="topicRepository"></param>
/// <param name="favouriteRepository"></param>
/// <param name="categoryService"></param>
public MembershipService(IMembershipRepository membershipRepository, ISettingsRepository settingsRepository,
IEmailService emailService, ILocalizationService localizationService, IActivityService activityService,
IPrivateMessageService privateMessageService, IMembershipUserPointsService membershipUserPointsService,
ITopicNotificationService topicNotificationService, IVoteService voteService, IBadgeService badgeService,
ICategoryNotificationService categoryNotificationService, ILoggingService loggingService, IUploadedFileService uploadedFileService,
IPostRepository postRepository, IPollVoteRepository pollVoteRepository, IPollAnswerRepository pollAnswerRepository,
IPollRepository pollRepository, ITopicRepository topicRepository, IFavouriteRepository favouriteRepository,
ICategoryService categoryService)
{
_membershipRepository = membershipRepository;
_settingsRepository = settingsRepository;
_emailService = emailService;
_localizationService = localizationService;
_activityService = activityService;
_privateMessageService = privateMessageService;
_membershipUserPointsService = membershipUserPointsService;
_topicNotificationService = topicNotificationService;
_voteService = voteService;
_badgeService = badgeService;
_categoryNotificationService = categoryNotificationService;
_loggingService = loggingService;
_uploadedFileService = uploadedFileService;
_postRepository = postRepository;
_pollVoteRepository = pollVoteRepository;
_pollAnswerRepository = pollAnswerRepository;
_pollRepository = pollRepository;
_topicRepository = topicRepository;
_favouriteRepository = favouriteRepository;
_categoryService = categoryService;
}
开发者ID:petemidge,项目名称:mvcforum,代码行数:53,代码来源:MembershipService.cs
示例15: AdminModule
public AdminModule(IdeastrikeContext dbContext, ISettingsRepository settings)
: base("/admin")
{
Get["/"] = _ => "";
Get["/moderation"] = _ => "";
Get["/search"] = _ => "";
Get["/forums"] = _ => "";
Get["/forum/{forumId}"] = _ => "";
Get["/settings"] = _ => View["Admin/Settings", settings];
Post["/settings"] = _ =>
{
settings.WelcomeMessage = Request.Form.welcomemessage;
settings.Title = Request.Form.title;
settings.Name = Request.Form.yourname;
settings.HomePage = Request.Form.homepage;
settings.GAnalyticsKey = Request.Form.analyticskey;
try
{
dbContext.SaveChanges();
}
catch (Exception ex)
{
var y = ex.Message;
}
return Response.AsRedirect("/admin/settings");
};
}
开发者ID:kiwipom,项目名称:Ideastrike,代码行数:28,代码来源:AdminModule.cs
示例16: SettingsViewModel
/// <summary>Initialises a new instance of the <see cref="SettingsViewModel"/> class.</summary>
/// <param name="settingsRepository">The settings repository.</param>
public SettingsViewModel(ISettingsRepository settingsRepository)
{
this.settingsRepository = settingsRepository;
this.SkyrimPath = this.settingsRepository.Read()["SkyrimPath"].ToString();
this.OrganizerPath = this.settingsRepository.Read()["ModOrganizerPath"].ToString();
}
开发者ID:Ruhrpottpatriot,项目名称:SkyrimCompileHelper,代码行数:9,代码来源:SettingsViewModel.cs
示例17: ProjectListViewModel
public ProjectListViewModel( IViewServiceRepository viewServices = null, ISettingsRepository settingsRepo = null, IProjectRepository projectRepo = null, IMessenger messenger = null )
: base( viewServices, settingsRepo, messenger )
{
ProjectRepo = projectRepo ?? new ProjectRepository( Session );
Projects = new ObservableCollection<ProjectViewModel>( ProjectRepo.GetAll().OrderBy( p => p.Name ).Select( p => new ProjectViewModel( p ) ) );
var last = Settings.GetById( SettingKeys.LastProject );
CurrentProject = Projects.FirstOrDefault( p => p.Model.Id == last.Get<int>() ) ?? Projects.FirstOrDefault();
foreach( var proj in Projects )
{
proj.CurrentChanged += Proj_CurrentChanged;
}
if( CurrentProject != null )
{
CurrentProject.IsCurrent = true;
}
ProjectNames = new List<string>();
Validate( nameof( NewProjectName ) ).Check( () => !string.IsNullOrWhiteSpace( NewProjectName ) ).Message( Strings.ProjectMustHaveName );
Validate( nameof( NewProjectName ) ).Check( () => !ProjectNames.Contains( NewProjectName ) ).Message( Strings.ThisNameIsAlreadyUsed );
Reset();
}
开发者ID:TheSylence,项目名称:GSD,代码行数:26,代码来源:ProjectListViewModel.cs
示例18: ViewModelBaseEx
protected ViewModelBaseEx( IViewServiceRepository viewServices = null, ISettingsRepository settingsRepo = null, IMessenger messenger = null )
{
MessengerInstance = messenger;
ViewServices = viewServices ?? App.ViewServices;
Session = App.Session;
Settings = settingsRepo ?? App.Settings;
}
开发者ID:TheSylence,项目名称:GSD,代码行数:7,代码来源:ViewModelBaseEx.cs
示例19: SettingsController
public SettingsController(ISettingsRepository repository, ISettingsView view)
{
this.repository = repository;
this.view = view;
view.SettingChanged += ViewOnSettingChanged;
view.OKClicked += ViewOnOKClicked;
}
开发者ID:cfiet,项目名称:resharper-jshint,代码行数:8,代码来源:SettingsController.cs
示例20: ConfigWindow
public ConfigWindow()
{
InitializeComponent();
settingsRepository = SimpleIoc.Default.GetInstance<ISettingsRepository>();
userInfo = settingsRepository.GetUserInfo();
ServerUrl.Text = userInfo.ServerURL;
}
开发者ID:BertaAndras,项目名称:secret-sensa,代码行数:8,代码来源:ConfigWindow.xaml.cs
注:本文中的ISettingsRepository类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论