This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using SPMeta2.VS.CSharp.ProvisionConsole2.Utils; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using SPMeta2.Models; | |
using SPMeta2.SSOM.Services; | |
using SPMeta2.CSOM.Services; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SiteAssetsModel = SPMeta2Model.NewSiteModel(site => | |
{ | |
site | |
.AddRootWeb(new RootWebDefinition(), RootWeb => | |
{ | |
RootWeb | |
.AddHostList(BuiltInListDefinitions.Catalogs.MasterPage, list => | |
{ | |
var FolderPath = Path.Combine(SystemPath, Assets); | |
if (Directory.Exists(FolderPath)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SPF = SPF || {}; | |
SPF.SPMeta2Test = SPF.SPMeta2Test || {}; | |
SPF.SPMeta2Test.SpfQuestionGroupLookupInternalName = "SpfQuestionGroupLookup"; | |
SPF.SPMeta2Test.QuestionGroupsList = "lists/QuestionGroups"; | |
SPF.SPMeta2Test.SubscriberContentTypeId = "0x010015CE7134F3C648F985B261F565870E7F"; | |
SPF.SPMeta2Test.AlertsListContentTypeId = "0x01003FF3E1F988B34BA6A792A49B89CCFE5F"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static LookupFieldDefinition SpfQuestionGroupLookup() | |
{ | |
return new LookupFieldDefinition | |
{ | |
Id = new Guid("71f80b57-f171-4fc6-9a51-c4233f56b7ab"), | |
Title = "Группа вопросов", | |
InternalName = "SpfQuestionGroupLookup", | |
Group = "SPMetaGroup", | |
Required = false, | |
LookupList = Guid.Empty.ToString(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string Assets = @"SiteAssets"; | |
public static string SystemPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); | |
public static string ApplyToPath = @"SiteAssets\SPF\Modules\CustomAlerts\spf.alerts.applyto.js"; | |
public static void FillApplytoFile() | |
{ | |
var SettingsArr = new string[] | |
{ | |
"var SPF = SPF || {};", | |
"SPF.SPMeta2Test = SPF.SPMeta2Test || {};", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void GenerateJavascriptFile(string Path, string[] JavascriptRows) | |
{ | |
if (System.IO.File.Exists(Path)) | |
{ | |
System.IO.File.Delete(Path); | |
} | |
System.IO.File.Create(Path).Dispose(); | |
using (TextWriter tw = new StreamWriter(Path, true, Encoding.UTF8)) | |
{ | |
var Builder = new StringBuilder(); |
NewerOlder