protected static void ResetClipboardedItems(ClipboardService clip, OpenResourceManager omgr, ServerConnectionManager connMgr) { //Reset state of clipboarded items if (clip.HasContent()) { object o = clip.Get(); var r = o as RepositoryItem; var rs = o as RepositoryItem[]; if (r != null) { var conn = connMgr.GetConnection(r.ConnectionName); ResetItem(omgr, r, conn); } else if (rs != null) { ResetItems(omgr, rs, connMgr); } } }
private new static void ResetClipboardedItems(ClipboardService clip, OpenResourceManager omgr, ServerConnectionManager connMgr) { //Reset state of clipboarded items if (clip.HasContent()) { object o = clip.Get(); var r = o as RepositoryItem; var rs = o as RepositoryItem[]; if (r != null) { var conn = connMgr.GetConnection(r.ConnectionName); r.Reset(); if (omgr.IsOpen(r.ResourceId, conn)) { r.IsOpen = true; var ed = omgr.GetOpenEditor(r.ResourceId, conn); if (ed.IsDirty) { r.IsDirty = true; } } } else if (rs != null) { foreach (var ri in rs) { var conn = connMgr.GetConnection(ri.ConnectionName); ri.Reset(); if (omgr.IsOpen(ri.ResourceId, conn)) { ri.IsOpen = true; var ed = omgr.GetOpenEditor(ri.ResourceId, conn); if (ed.IsDirty) { ri.IsDirty = true; } } } } } }