public common_namespace_event GetNamespaceEvent(int offset)
 {
     definition_node dn = null;
     if (members.TryGetValue(offset, out dn))
         return dn as common_namespace_event;
     common_namespace_event cne = null;
     int pos = (int)br.BaseStream.Position;
     br.BaseStream.Seek(start_pos + offset, SeekOrigin.Begin);
     br.ReadByte();
     string name;
     bool is_interface = br.ReadBoolean();
     if (is_interface)//пропускаем флаг - интерфейсности
     {
         name = GetString(br.ReadInt32());
     }
     else
     {
         name = br.ReadString();
     }
     cne = new common_namespace_event(name, null, cun.namespaces[0], null, null, null, null);
     cne.set_event_type(GetTypeReference());
     if (CanReadObject())
         cne.set_add_function(GetNamespaceFunction(br.ReadInt32()));
     if (CanReadObject())
         cne.set_remove_function(GetNamespaceFunction(br.ReadInt32()));
     if (CanReadObject())
         cne.set_raise_function(GetNamespaceFunction(br.ReadInt32()));
     cne.field = GetNamespaceVariable(br.ReadInt32());
     br.ReadInt32();
     cne.loc = ReadDebugInfo();
     AddMember(cne, offset);
     if (is_interface)
     {
         cne.namespace_node = cun.namespaces[0];
         int_members.Add(cne);
     }
     else
     {
         cne.namespace_node = cun.namespaces[1];
         impl_members.Add(cne);
     }
     br.BaseStream.Seek(pos, SeekOrigin.Begin);
     return cne;
 }
 private common_namespace_event CreateInterfaceNamespaceEvent(string name, int offset)
 {
     definition_node dn = null;
     if (members.TryGetValue(offset, out dn))
         return dn as common_namespace_event;
     common_namespace_event cne = null;
     cne = new common_namespace_event(name, null, cun.namespaces[0], null, null, null, null);
     br.ReadBoolean();
     br.ReadInt32();
     cne.set_event_type(GetTypeReference());
     if (CanReadObject())
         cne.set_add_function(GetNamespaceFunction(br.ReadInt32()));
     if (CanReadObject())
         cne.set_remove_function(GetNamespaceFunction(br.ReadInt32()));
     if (CanReadObject())
         cne.set_raise_function(GetNamespaceFunction(br.ReadInt32()));
     cne.field = GetNamespaceVariable(br.ReadInt32());
     br.ReadInt32();
     cne.loc = ReadDebugInfo();
     AddMember(cne, offset);
     int_members.Add(cne);
     return cne;
 }