/// <summary> /// Sets the codebase of the application manifest reference in the given deployment manifest. /// </summary> /// <param name="deploymentManifest">DeploymentManifest object</param> /// <param name="appCodeBase">Codebase</param> private static void SetApplicationCodeBase(DeployManifest deploymentManifest, string appCodeBase) { if (deploymentManifest == null) { return; } AssemblyReferenceCollection collection = deploymentManifest.AssemblyReferences; AssemblyReference ar; if (collection.Count > 0) { ar = collection[0]; ar.TargetPath = appCodeBase; } else { ar = new AssemblyReference(appCodeBase) { TargetPath = appCodeBase }; collection.Add(ar); } }
/// <summary> /// Creates an instance of the class /// </summary> public CodeEditorControl() { InitializeComponent(); referencePanel1.ParentEditor = this; References = new AssemblyReferenceCollection(); References.ListChanged += new ListChangedEventHandler(References_ListChanged); ErrorPanelSettings = new ErrorPanelOptions(this); ReferencePanelSettings = new ReferencePanelOptions(this); CompileRequestOptions = new CompileRequestOptions(); wpfControl1.ParentControl = this; Persistance = new CSharpTextEditor.PersistanceCache(this); buttonErrorPanelOpenHide_Click(this, new EventArgs()); if (!DesignMode) { // PersistencePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CodeEditorControl"); Caret_PositionChanged(this, new EventArgs()); wpfControl1.TextEditor1.KeyUp += new System.Windows.Input.KeyEventHandler(TextEditor1_KeyUp); wpfControl1.TextEditor1.TextArea.Caret.PositionChanged += new EventHandler(Caret_PositionChanged); } // TODO: button focus change if need }
private void SaveReferenceCollection(AssemblyReferenceCollection referenceCollection) { try { _readerWriterLock.EnterWriteLock(); var dataFile = GetReferenceDataFile(); var jsonData = JsonConvert.SerializeObject(referenceCollection, Formatting.Indented); Kooboo.IO.IOUtility.SaveStringToFile(dataFile, jsonData); } finally { _readerWriterLock.ExitWriteLock(); } }
private AssemblyReferenceCollection RebuildReferenceData() { try { AssemblyReferenceCollection list = new AssemblyReferenceCollection(); _readerWriterLock.EnterWriteLock(); var binFolder = Path.Combine(_baseDir.CMSBaseDir + "Bin"); foreach (var item in Directory.EnumerateFiles(binFolder, "*.dll")) { var fileName = Path.GetFileName(item); var version = GetAssemblyVersion(item); list.Add(new AssemblyReferenceData(fileName, version, "System") { IsSystemAssembly = true }); } return list; } finally { _readerWriterLock.ExitWriteLock(); } }
public static bool Compare(this AssemblyReferenceCollection source, AssemblyReferenceCollection n, Func<AssemblyReference, AssemblyReference, Action<string, string>, bool> checkitem, Action<string, string> errAct) { return Compare<AssemblyReference>(source,n,checkitem,errAct); }
public static bool Compare(this AssemblyReferenceCollection source, AssemblyReferenceCollection n, Func<AssemblyReference, AssemblyReference, bool> checkitem) { return Compare<AssemblyReference>(source,n,checkitem); }
public static bool Compare(this AssemblyReferenceCollection source, AssemblyReferenceCollection n) { return Compare<AssemblyReference>(source,n); }
public static bool Compare(this AssemblyReferenceCollection source, AssemblyReferenceCollection n, Func <AssemblyReference, AssemblyReference, Action <string, string>, bool> checkitem, Action <string, string> errAct) { return(Compare <AssemblyReference>(source, n, checkitem, errAct)); }
public static bool Compare(this AssemblyReferenceCollection source, AssemblyReferenceCollection n, Func <AssemblyReference, AssemblyReference, bool> checkitem) { return(Compare <AssemblyReference>(source, n, checkitem)); }
public static bool Compare(this AssemblyReferenceCollection source, AssemblyReferenceCollection n) { return(Compare <AssemblyReference>(source, n)); }
public virtual IAssemblyReferenceCollection TransformAssemblyReferenceCollection(IAssemblyReferenceCollection value) { IAssemblyReference[] array = new IAssemblyReference[value.Count]; for (int i = 0; i < value.Count; i++) { array[i] = this.TransformAssemblyReference(value[i]); } IAssemblyReferenceCollection target = new AssemblyReferenceCollection(); target.AddRange(array); return target; }