本文整理汇总了C#中SiteSettings类的典型用法代码示例。如果您正苦于以下问题:C# SiteSettings类的具体用法?C# SiteSettings怎么用?C# SiteSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SiteSettings类属于命名空间,在下文中一共展示了SiteSettings类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SiteSettingsViewModel
public SiteSettingsViewModel()
{
BookmarkTitle = "Site Settings";
Settings = Context.SiteSettings.FirstOrDefault();
// Set some initial values if none are found.
if (Settings == null)
{
Settings = new SiteSettings()
{
SearchIndex = true
};
Context.SiteSettings.Add(Settings);
Context.SaveChanges();
}
SiteRetensionTimeValues = new Dictionary<int, bool>
{
{ 5, Settings.ContentPageRevisionsRetensionCount == 5 },
{ 10, Settings.ContentPageRevisionsRetensionCount == 10 },
{ 25, Settings.ContentPageRevisionsRetensionCount == 25 },
{ 50, Settings.ContentPageRevisionsRetensionCount == 50 }
};
RolesList = Roles.GetAllRoles().ToList();
}
开发者ID:codevlabs,项目名称:DirigoEdge,代码行数:28,代码来源:SiteSettingsViewModel.cs
示例2: SettingsFunctions
private void SettingsFunctions(SiteSettings SiteSettings)
{
Func<ActionExecutingContext, string> operationsFunc = FilterContext =>
{
var type = FilterContext.HttpContext.Request["Type"];
if (String.IsNullOrWhiteSpace(type))
{
var key = FilterContext.RouteData.Values.Keys.
FirstOrDefault(x => x.Equals("Type", StringComparison.OrdinalIgnoreCase));
if (key == null)
{
throw new Exception("No default parameter found in route values. Looking for parameter 'type'.");
}
type = FilterContext.RouteData.Values[key].ToString();
}
var apType = (ApType)Enum.Parse(typeof(ApType), type, true);
FilterContext.ActionParameters["ApType"] = apType;
switch (apType)
{
case ApType.blog:
return "Default";
default:
throw new Exception("Unable to find area name for type " + apType);
}
};
SiteSettings.Actions.Add("Operations", operationsFunc);
}
开发者ID:nathanpalmer,项目名称:LittleBanking,代码行数:34,代码来源:MvcModule.cs
示例3: Initialize
public override void Initialize(SiteSettings siteSettings)
{
base.Initialize(siteSettings);
if (!string.IsNullOrEmpty(bonanzaKategori_regEx)) regEx_bonanzaKategori = new Regex(bonanzaKategori_regEx, RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | RegexOptions.ExplicitCapture);
if (!string.IsNullOrEmpty(bonanzaSerie_regEx)) regEx_bonanzaSerie = new Regex(bonanzaSerie_regEx, RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | RegexOptions.ExplicitCapture);
if (!string.IsNullOrEmpty(bonanzaVideolist_regEx)) regEx_bonanzaVideolist = new Regex(bonanzaVideolist_regEx, RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | RegexOptions.ExplicitCapture);
}
开发者ID:offbyoneBB,项目名称:mp-onlinevideos2,代码行数:7,代码来源:DRNUUtil.cs
示例4: TestMethod
public void TestMethod()
{
HockeyStreams hs = new HockeyStreams();
hs.setUsername("geoffstewart");
hs.setPassword("homer");
// System.Collections.Generic.List<VideoInfo> videoList = hs.getVideoList(null);
//
// foreach (VideoInfo vi in videoList) {
// List<string> urls = hs.getMultipleVideoUrls(vi, false);
// Console.Out.Write(urls);
// }
SiteSettings s = new SiteSettings();
hs.Initialize(s);
hs.Settings.Categories = new System.ComponentModel.BindingList<Category>();
hs.DiscoverDynamicCategories();
// live games
hs.DiscoverSubCategories(hs.Settings.Categories[0]);
Category game = hs.Settings.Categories[0].SubCategories[0];
List<VideoInfo> vidList = hs.GetVideos(game);
// archived games
hs.DiscoverSubCategories(hs.Settings.Categories[1]);
List<VideoInfo> vidList2 = hs.GetVideos(hs.Settings.Categories[1].SubCategories[0]);
List<string> vidList3 = hs.GetMultipleVideoUrls(vidList2[0], false);
}
开发者ID:leesanghyun2,项目名称:mp-onlinevideos2,代码行数:32,代码来源:TestHockeyStreams.cs
示例5: VideoViewModel
public VideoViewModel(VideoInfo videoInfo, Category category, SiteSettings siteSettings, bool isDetailsVideo)
: base(Consts.KEY_NAME, isDetailsVideo ? ((DetailVideoInfo)videoInfo).Title2 : videoInfo.Title)
{
SiteSettings = siteSettings;
VideoInfo = videoInfo;
Category = category;
SiteName = siteSettings.Name;
SiteUtilName = siteSettings.UtilName;
IsDetailsVideo = isDetailsVideo;
_titleProperty = new WProperty(typeof(string), videoInfo.Title);
_title2Property = new WProperty(typeof(string), isDetailsVideo ? ((DetailVideoInfo)videoInfo).Title2 : string.Empty);
_descriptionProperty = new WProperty(typeof(string), videoInfo.Description);
_lengthProperty = new WProperty(typeof(string), videoInfo.Length);
_airdateProperty = new WProperty(typeof(string), videoInfo.Airdate);
_thumbnailImageProperty = new WProperty(typeof(string), videoInfo.ThumbnailImage);
_contextMenuEntriesProperty = new WProperty(typeof(ItemsList), null);
_eventDelegator = OnlineVideosAppDomain.Domain.CreateInstanceAndUnwrap(typeof(PropertyChangedDelegator).Assembly.FullName, typeof(PropertyChangedDelegator).FullName) as PropertyChangedDelegator;
_eventDelegator.InvokeTarget = new PropertyChangedExecutor
{
InvokeHandler = (s, e) =>
{
if (e.PropertyName == "ThumbnailImage") ThumbnailImage = (s as VideoInfo).ThumbnailImage;
else if (e.PropertyName == "Length") Length = (s as VideoInfo).Length;
}
};
VideoInfo.PropertyChanged += _eventDelegator.EventDelegate;
}
开发者ID:offbyoneBB,项目名称:mp-onlinevideos2,代码行数:30,代码来源:VideoViewModel.cs
示例6: PublishSiteWindow
public PublishSiteWindow(SiteSettings site)
{
Site = site;
PublishCommand = new RelayCommand(Publish, CanPublish);
RegisterCommand = new RelayCommand(Register, CanRegister);
DataContext = this;
InitializeComponent();
}
开发者ID:offbyoneBB,项目名称:mp-onlinevideos2,代码行数:8,代码来源:PublishSiteWindow.xaml.cs
示例7: Initialize
public override void Initialize(SiteSettings siteSettings)
{
base.Initialize(siteSettings);
regEx_SubSubCategory = regEx_dynamicSubCategories;
regEx_SubCategory = regEx_dynamicCategories;
regEx_dynamicCategories = null;
regEx_Generos = new Regex(generosRegEx, defaultRegexOptions);
}
开发者ID:leesanghyun2,项目名称:mp-onlinevideos2,代码行数:8,代码来源:TVEUtil.cs
示例8: Load
public static SiteSettings Load()
{
var settings = new SiteSettings();
settings.Value = new Repository("").Load(FileName);
settings.Value = SiteEngine.RunHook("get_site_settings", settings.Value);
//Log.Enabled = ((ExpandoObject)settings.Value).HasProperty("EnableLog", "on");
return settings;
}
开发者ID:yysun,项目名称:Rabbit,代码行数:8,代码来源:SiteSettings.cs
示例9: Initialize
public override void Initialize(SiteSettings siteSettings)
{
base.Initialize(siteSettings);
regEx_Shows = new Regex(showsRegex, RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace);
regEx_Playlist = new Regex(playlistRegex, RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace);
regEx_Videolist = new Regex(videolistRegEx, RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | RegexOptions.ExplicitCapture);
}
开发者ID:leesanghyun2,项目名称:mp-onlinevideos2,代码行数:8,代码来源:MdrUtil.cs
示例10: Initialize
public override void Initialize(SiteSettings siteSettings)
{
base.Initialize(siteSettings);
URL_regEx = @"//user\strack\svariables.*?var\sut_section_id\s=\s""(?<ut_section_id>[^""]+).*?var\smedia_id\s=\s""(?<media_id>[^""]+).*?var\ssite_id\s=\s""(?<site_id>[^""]+).*?var\ssection_id\s=\s'(?<section_id>[^']+)";
URLFile_regEx = @"\<item\stype="".+?src=""(?<FileUrl>[^""]+)"".+?server=""(?<FileServer>[^""]+)"".+?(?:mimetype=""(?<FileType>[^""]+)"")?";
regEx_URL = new Regex(URL_regEx, RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline);
regEx_URLFile = new Regex(URLFile_regEx, RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline);
}
开发者ID:leesanghyun2,项目名称:mp-onlinevideos2,代码行数:9,代码来源:NovaTV.cs
示例11: Initialize
public override void Initialize(SiteSettings siteSettings)
{
base.Initialize(siteSettings);
RegexOptions defaultRegexOptions = RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | RegexOptions.ExplicitCapture;
if (!string.IsNullOrEmpty(dynamicSubSubCategoriesRegEx)) regEx_dynamicSubSubCategories = new Regex(dynamicSubSubCategoriesRegEx, defaultRegexOptions);
if (!string.IsNullOrEmpty(dynamicSubSubCategoriesNextPageRegEx)) regEx_dynamicSubSubCategoriesNextPage = new Regex(dynamicSubSubCategoriesNextPageRegEx, defaultRegexOptions);
}
开发者ID:leesanghyun2,项目名称:mp-onlinevideos2,代码行数:9,代码来源:Movie2KSerienUtil.cs
示例12: AdminLoginModule
public AdminLoginModule(ILoginService loginService, IDocumentStore store)
: base("/admin")
{
this.RequiresInstallerDisabled(() => store.OpenSession());
this.RequiresHttpsOrXProto();
Get["/login"] =
parameters =>
{
using (IDocumentSession session = store.OpenSession())
{
SiteSettings site = session.GetSiteSettings();
if (site == null)
{
site = new SiteSettings
{
Title = "Admin",
SubTitle = "Go to Site -> Settings"
};
}
return View["admin/login", new
{
site.Title,
SubTitle = "Login"
}];
}
};
Get["/logout"] = parameters =>
{
// Called when the user clicks the sign out button in the application. Should
// perform one of the Logout actions (see below)
return View["admin/logout"];
};
Post["/login"] = parameters =>
{
// Called when the user submits the contents of the login form. Should
// validate the user based on the posted form data, and perform one of the
// Login actions (see below)
var loginParameters = this.Bind<LoginParameters>();
User user;
if (!loginService.Login(loginParameters.UserName, loginParameters.Password, out user))
{
return global::System.Net.HttpStatusCode.Unauthorized;
}
return this.LoginAndRedirect(
user.Identifier,
fallbackRedirectUrl: "/admin",
cookieExpiry: DateTime.Now.AddHours(1));
};
}
开发者ID:pekkah,项目名称:tanka,代码行数:57,代码来源:AdminLoginModule.cs
示例13: OnlineSiteViewModel
public OnlineSiteViewModel(OnlineVideosWebservice.Site site, SiteSettings localSite)
: base(Consts.KEY_NAME, site.Name)
{
_lastUpdatedProperty = new WProperty(typeof(DateTime), default(DateTime));
Site = site;
LocalSite = localSite;
Owner = !string.IsNullOrEmpty(site.Owner_FK) ? site.Owner_FK.Substring(0, site.Owner_FK.IndexOf('@')) : string.Empty;
LastUpdated = site.LastUpdated.ToLocalTime();
}
开发者ID:leesanghyun2,项目名称:mp-onlinevideos2,代码行数:10,代码来源:OnlineSiteViewModel.cs
示例14: Initialize
public override void Initialize(SiteSettings siteSettings)
{
base.Initialize(siteSettings);
base._title = "BFM Business";
base._img = "bfmbusiness";
base._urlToken = "http://api.nextradiotv.com/bfmbusiness-iphone/3/";
base._urlMenu = "http://api.nextradiotv.com/bfmbusiness-iphone/3/{0}/getMainMenu";
base._urlVideoList = "http://api.nextradiotv.com/bfmbusiness-iphone/3/{0}/getVideosList?count=40&page=1&category={1}";
base._urlVideo = "http://api.nextradiotv.com/bfmbusiness-iphone/3/{0}/getVideo?idVideo={1}&quality=2";
}
开发者ID:flanagan-k,项目名称:mp-onlinevideos2,代码行数:10,代码来源:BFMBusinessUtil.cs
示例15: Initialize
public override void Initialize(SiteSettings siteSettings)
{
base.Initialize(siteSettings);
base._title = "RMC Sport";
base._img = "rmcsport";
base._urlToken = "http://api.nextradiotv.com/rmcsport-android/3/";
base._urlMenu = "http://api.nextradiotv.com/rmcsport-android/3/{0}/getMainMenu";
base._urlVideoList = "http://api.nextradiotv.com/rmcsport-android/3/{0}/getVideosList?count=40&page=1&category={1}";
base._urlVideo = "http://api.nextradiotv.com/rmcsport-android/3/{0}/getVideo?idVideo={1}&quality=2";
}
开发者ID:offbyoneBB,项目名称:mp-onlinevideos2,代码行数:11,代码来源:RmcSportUtil.cs
示例16: Initialize
public override void Initialize(SiteSettings siteSettings)
{
base.Initialize(siteSettings);
regex_Genres = new Regex(genresRegEx, defaultRegexOptions);
regex_AZSubCategories = new Regex(aZSubCategoriesRegEx, defaultRegexOptions);
regex_SeriesSubCategories = new Regex(seriesSubCategoriesRegEx, defaultRegexOptions);
regex_SeasonCategories = new Regex(seasonCategoriesRegEx, defaultRegexOptions);
regex_ShowVideoList = new Regex(showVideoListRegEx, defaultRegexOptions);
regex_MoviesVideoList = new Regex(moviesVideoListRegEx, defaultRegexOptions);
}
开发者ID:offbyoneBB,项目名称:mp-onlinevideos2,代码行数:11,代码来源:TubePlusUtil.cs
示例17: Initialize
public override void Initialize(SiteSettings siteSettings)
{
base.Initialize(siteSettings);
// Populate list of video items to skip (invalid video urls etc..)
// No longer required however if issues pop-popup we can get new entries her.
//videosToSkip.Add("gt/live");
//videosToSkip.Add("gt time");
videosToSkip.Add("comic-con");
videosToSkip.Add("e3 " + DateTime.Now.Year);
}
开发者ID:lopeztuparles,项目名称:mp-onlinevideos2,代码行数:12,代码来源:GameTrailersUtil.cs
示例18: Initialize
public override void Initialize(SiteSettings siteSettings)
{
base.Initialize(siteSettings);
videoUrlRegex[0] = @"<embed.*?src=""(?<url>[^""]+)""";
videoUrlRegex[1] = @"<a\shref=""(?<url>[^""]+)""";
videoUrlRegex[2] = @"param\sname=""src""\s*value=""(?<url>[^""]+)""";
for (int i = 0; i < videoUrlRegex.Length; i++)
regEx_VideoUrl[i] = new Regex(videoUrlRegex[i], RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline);
}
开发者ID:flanagan-k,项目名称:mp-onlinevideos2,代码行数:12,代码来源:CinemassacreUtil.cs
示例19: InitSiteSettings
private static void InitSiteSettings(DataContext context)
{
var siteSettings = context.SiteSettings.FirstOrDefault();
if (siteSettings != null)
{
return;
}
siteSettings = new SiteSettings
{
SearchIndex = true
};
context.SiteSettings.Add(siteSettings);
}
开发者ID:hyrmedia,项目名称:DirigoEdge,代码行数:14,代码来源:SettingsInitializer.cs
示例20: Initialize
public override void Initialize(SiteSettings siteSettings)
{
base.Initialize(siteSettings);
mediaAccess = new MpExtendedService.MediaAccessService();
mediaAccess.Url = String.Format("http://{0}:{1}/MPExtended/MediaAccessService/", mServer, mPort);
mediaAccess.Credentials = new NetworkCredential(mUsername, mPassword);
tvAccess = new MpExtendedTvService.TVAccessService();
tvAccess.Url = String.Format("http://{0}:{1}/MPExtended/TvAccessService/", mServer, mPort);
tvAccess.Credentials = new NetworkCredential(mUsername, mPassword);
mediaStreaming = new MpExtendedStreamingService.SoapEndpoint();
mediaStreaming.Url = String.Format("http://{0}:{1}/MPExtended/StreamingService/soap", mServer, mPort);
mediaStreaming.Credentials = new NetworkCredential(mUsername, mPassword);
}
开发者ID:leesanghyun2,项目名称:mp-onlinevideos2,代码行数:15,代码来源:MpExtended.cs
注:本文中的SiteSettings类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论