public void Dispose()
        {
            if ((null != connectionPoint) && (0 != connectionCookie))
            {
                connectionPoint.Unadvise(connectionCookie);
                System.Diagnostics.Debug.WriteLine("\n\tUnadvised from TextLinesEvents\n");
            }
            connectionCookie = 0;
            connectionPoint  = null;

            this.buffer = null;
            this.fileId = null;
        }
        public TextLineEventListener(IVsTextLines buffer, string fileName, XSharpModuleId id)
        {
            this.buffer   = buffer;
            this.fileId   = id;
            this.fileName = fileName;
            IConnectionPointContainer container = buffer as IConnectionPointContainer;

            if (null != container)
            {
                Guid eventsGuid = typeof(IVsTextLinesEvents).GUID;
                container.FindConnectionPoint(ref eventsGuid, out connectionPoint);
                connectionPoint.Advise(this as IVsTextLinesEvents, out connectionCookie);
            }
        }
        public override bool Equals(object obj)
        {
            XSharpModuleId other = obj as XSharpModuleId;

            if (null == obj)
            {
                return(false);
            }
            if (!ownerHierarchy.Equals(other.ownerHierarchy))
            {
                return(false);
            }
            return(itemId == other.itemId);
        }
 public LibraryTask(string fileName, XSharpModuleId ModuleID)
 {
     this.FileName = fileName;
     this.ModuleID = ModuleID;
 }