/// <summary> /// Sets the handler for this solution item /// </summary> /// <param name='handler'> /// A handler. /// </param> internal virtual void SetItemHandler(ISolutionItemHandler handler) { if (this.handler != null) { this.handler.Dispose(); } this.handler = handler; }
internal override void SetItemHandler(ISolutionItemHandler handler) { string oldName = Name; string oldFile = FileName; base.SetItemHandler(handler); // This will update the name if needed, when SyncFileName is true Name = oldName; if (!string.IsNullOrEmpty(oldFile)) { FileName = oldFile; } }
internal override void SetItemHandler(ISolutionItemHandler handler) { if (ProjectExtensionUtil.GetItemHandler(this) == null) { // Initial assignment of the item handler base.SetItemHandler(handler); return; } IResourceHandler rh = ResourceHandler; base.SetItemHandler(handler); resourceHandler = null; // A change in the file format may imply a change in the resource naming policy. // Make sure that the resource Id don't change. MigrateResourceIds(rh, ResourceHandler); }
internal override void SetItemHandler (ISolutionItemHandler handler) { if (ProjectExtensionUtil.GetItemHandler (this) == null) { // Initial assignment of the item handler base.SetItemHandler (handler); return; } IResourceHandler rh = ResourceHandler; base.SetItemHandler (handler); resourceHandler = null; // A change in the file format may imply a change in the resource naming policy. // Make sure that the resource Id don't change. MigrateResourceIds (rh, ResourceHandler); }
public static void InstallHandler(ISolutionItemHandler handler, SolutionItem item) { item.SetItemHandler(handler); }
public static void InstallHandler (ISolutionItemHandler handler, SolutionItem item) { item.SetItemHandler (handler); }