コード例 #1
0
ファイル: ServiceEntry.cs プロジェクト: simongh/slpnet
        internal void ToBytes(SlpWriter writer)
        {
            if (Uri == null)
                throw new ServiceException("Service URL cannot be null.");

            writer.Write((byte)0);
            writer.Write((short)Lifetime.TotalSeconds);
            writer.Write(Uri.ToString());
            writer.Write((byte)AuthBlocks.Count);

            foreach (var item in AuthBlocks)
            {
                item.ToBytes(writer);
            }
        }