Beispiel #1
0
        public void WriteTopics(IndexMaker maker, Stream stream, BinaryWriter writer)
        {
            //
            // Convention: entries with the same SortKey should have the same Caption
            //
            Position = (int)stream.Position;
            writer.Write(Count);

            if (topics is ArrayList)
            {
                bool first = true;
                foreach (Topic t in (ArrayList)topics)
                {
                    if (first)
                    {
                        writer.Write(maker.GetCode(t.Caption));
                        first = false;
                    }
                    writer.Write(maker.GetCode(t.Url));
                }
            }
            else
            {
                Topic t = (Topic)topics;

                writer.Write(maker.GetCode(t.Caption));
                writer.Write(maker.GetCode(t.Url));
            }
        }
Beispiel #2
0
        public void WriteTopics(IndexMaker maker, Stream stream, BinaryWriter writer)
        {
            //
            // Convention: entries with the same SortKey should have the same Caption
            //
            Position = (int)stream.Position;
            writer.Write(Count);

            if (Count == 0)
            {
                return;
            }

            writer.Write(maker.GetCode(topics[0].Caption));
            foreach (Topic t in topics)
            {
                writer.Write(maker.GetCode(t.Url));
            }
        }
Beispiel #3
0
		public void WriteTopics (IndexMaker maker, Stream stream, BinaryWriter writer)
		{
			//
			// Convention: entries with the same SortKey should have the same Caption
			//
			Position = (int) stream.Position;
			writer.Write (Count);

			if (Count == 0)
				return;

			writer.Write (maker.GetCode (topics[0].Caption));
			foreach (Topic t in topics)
				writer.Write (maker.GetCode (t.Url));
		}
Beispiel #4
0
	public void WriteTopics (IndexMaker maker, Stream stream, BinaryWriter writer)
	{
		//
		// Convention: entries with the same SortKey should have the same Caption
		//
		Position = (int) stream.Position;
		writer.Write (Count);

		if (topics is ArrayList){
			bool first = true;
			foreach (Topic t in (ArrayList) topics){
				if (first){
					writer.Write (maker.GetCode (t.Caption));
					first = false;
				}
				writer.Write (maker.GetCode (t.Url));
			}
		} else {
			Topic t = (Topic) topics;

			writer.Write (maker.GetCode (t.Caption));
			writer.Write (maker.GetCode (t.Url));
		}
	}