コード例 #1
0
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            Scopes.AddRange(reader.ReadList());
            Service = Services.Locator.GetInstance<ServiceEntry>(reader);
            Tags.AddRange(reader.ReadList());
        }
コード例 #2
0
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            Scopes.AddRange(reader.ReadList());
            Service = Services.Locator.GetInstance <ServiceEntry>(reader);
            Tags.AddRange(reader.ReadList());
        }
コード例 #3
0
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            ReadIPList(reader, PreviousResponders);
            Uri = new ServiceUri(reader.ReadString());
            Scopes.AddRange(reader.ReadList());
            Tags.AddRange(reader.ReadList());
            Spi = reader.ReadString();
        }
コード例 #4
0
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            ErrorCode     = (ServiceErrorCode)reader.ReadInt16();
            BootTimeStamp = reader.ReadDateTime();
            var url = reader.ReadString();

            Scopes.AddRange(reader.ReadList());
            Uri = new ServiceUri(url, Services.Locator.GetInstance <AttributeCollection>(reader));
            SpiStrings.AddRange(reader.ReadList());
            ReadAuthBlocks(reader, AuthBlocks);
        }
コード例 #5
0
ファイル: ServiceTypeReply.cs プロジェクト: simongh/slpnet
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            var tmp = reader.ReadList();
            ServiceTypes = new ReadOnlyCollection<ServiceUri>(tmp.Select(s => new ServiceUri("service:" + s)).ToArray());
        }
コード例 #6
0
ファイル: ServiceTypeReply.cs プロジェクト: simongh/slpnet
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            var tmp = reader.ReadList();

            ServiceTypes = new ReadOnlyCollection <ServiceUri>(tmp.Select(s => new ServiceUri("service:" + s)).ToArray());
        }
コード例 #7
0
ファイル: ServiceRequest.cs プロジェクト: simongh/slpnet
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            ReadIPList(reader, PreviousResponders);
            Scopes.AddRange(reader.ReadList());
            AttributeFilter = reader.ReadString();
            Spi             = reader.ReadString();
        }
コード例 #8
0
ファイル: ServiceAgentAdvert.cs プロジェクト: simongh/slpnet
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            var tmp = reader.ReadString();

            Scopes.AddRange(reader.ReadList());
            Uri = new ServiceUri(tmp, Services.Locator.GetInstance <AttributeCollection>(reader));
            ReadAuthBlocks(reader, AuthBlocks);
        }
コード例 #9
0
ファイル: RequestBase.cs プロジェクト: simongh/slpnet
 protected void ReadIPList(SlpReader reader, IList<IPAddress> list)
 {
     foreach (var item in reader.ReadList())
     {
         var i = IPAddress.Parse(item);
         if (i.AddressFamily != AddressFamily.InterNetwork)
             throw new ServiceException("IP v4 addresses are the only allowable type.");
         list.Add(i);
     }
 }
コード例 #10
0
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            Service = Services.Locator.GetInstance<ServiceEntry>(reader);
            var tmp = reader.ReadString();
            Scopes.AddRange(reader.ReadList());
            Service.Uri = new ServiceUri("service:" + tmp + ":" + Services.Locator.GetInstance<AttributeCollection>(reader));
            ReadAuthBlocks(reader, AuthBlocks);
        }
コード例 #11
0
 protected void ReadIPList(SlpReader reader, IList <IPAddress> list)
 {
     foreach (var item in reader.ReadList())
     {
         var i = IPAddress.Parse(item);
         if (i.AddressFamily != AddressFamily.InterNetwork)
         {
             throw new ServiceException("IP v4 addresses are the only allowable type.");
         }
         list.Add(i);
     }
 }
コード例 #12
0
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            var tmp = reader.ReadInt16();

            if (tmp == 0xfff)
            {
                GetAllAuthorities = true;
            }
            else
            {
                NamingAuthority = reader.ReadString(tmp);
            }

            Scopes.AddRange(reader.ReadList());
        }
コード例 #13
0
ファイル: AttributeRequest.cs プロジェクト: simongh/slpnet
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            ReadIPList(reader, PreviousResponders);
            Uri = new ServiceUri(reader.ReadString());
            Scopes.AddRange(reader.ReadList());
            Tags.AddRange(reader.ReadList());
            Spi = reader.ReadString();
        }
コード例 #14
0
ファイル: ServiceTypeRequest.cs プロジェクト: simongh/slpnet
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            var tmp = reader.ReadInt16();
            if (tmp == 0xfff)
                GetAllAuthorities = true;
            else
                NamingAuthority = reader.ReadString(tmp);

            Scopes.AddRange(reader.ReadList());
        }
コード例 #15
0
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            ErrorCode = (ServiceErrorCode)reader.ReadInt16();
            BootTimeStamp = reader.ReadDateTime();
            var url = reader.ReadString();
            Scopes.AddRange(reader.ReadList());
            Uri = new ServiceUri(url, Services.Locator.GetInstance<AttributeCollection>(reader));
            SpiStrings.AddRange(reader.ReadList());
            ReadAuthBlocks(reader, AuthBlocks);
        }
コード例 #16
0
ファイル: ServiceRequest.cs プロジェクト: simongh/slpnet
        internal override void Create(SlpReader reader)
        {
            base.Create(reader);

            ReadIPList(reader, PreviousResponders);
            Scopes.AddRange(reader.ReadList());
            AttributeFilter = reader.ReadString();
            Spi = reader.ReadString();
        }