Esempio n. 1
0
        public void HandleClassIndicator(Broker broker, IDecoder decoder, long sequence)
        {
            short    kind     = decoder.ReadUint8();
            ClassKey classKey = new ClassKey(decoder);
            bool     unknown  = false;


            lock (LockObject) {
                if (Packages.ContainsKey(classKey.PackageName))
                {
                    if (!Packages[classKey.PackageName].ContainsKey(classKey.GetKeyString()))
                    {
                        unknown = true;
                    }
                }
            }

            if (unknown)
            {
                broker.IncrementOutstanding();
                long     seq = SequenceManager.Reserve(Session.CONTEXT_STARTUP);
                IEncoder enc = broker.CreateEncoder('S', seq);
                classKey.encode(enc);
                broker.Send(enc);
            }
        }
Esempio n. 2
0
        public void HandlePackageIndicator(Broker broker, IDecoder decoder, long sequence)
        {
            string packageName = decoder.ReadStr8();
            bool   notify      = false;

            if (!Packages.ContainsKey(packageName))
            {
                lock (LockObject) {
                    Packages[packageName] = new Dictionary <string, SchemaClass>();
                    notify = true;
                }
            }

            if (notify && Console != null)
            {
                Console.NewPackage(packageName);
            }

            broker.IncrementOutstanding();
            long     seq = SequenceManager.Reserve(Session.CONTEXT_STARTUP);
            IEncoder enc = broker.CreateEncoder('Q', seq);

            enc.WriteStr8(packageName);
            broker.Send(enc);
        }
Esempio n. 3
0
		public void HandleClassIndicator(Broker broker, IDecoder decoder, long sequence) {
			short kind = decoder.ReadUint8() ;	
			ClassKey classKey = new ClassKey(decoder) ;
			bool unknown = false ;
			
			
			lock (LockObject) {
				if (Packages.ContainsKey(classKey.PackageName)) {
					if (!Packages[classKey.PackageName].ContainsKey(classKey.GetKeyString())) {
						unknown = true ;
					}
				}
			}
			
			if (unknown) {
				broker.IncrementOutstanding() ;
				long seq = SequenceManager.Reserve(Session.CONTEXT_STARTUP) ; 
				IEncoder enc = broker.CreateEncoder('S', seq) ;			
				classKey.encode(enc) ;	
				broker.Send(enc) ;				
			}
		}		
Esempio n. 4
0
		public void HandlePackageIndicator(Broker broker, IDecoder decoder, long sequence) {
			string packageName = decoder.ReadStr8() ;
			bool notify = false ;
			if (!Packages.ContainsKey(packageName)) {
				lock (LockObject) {
					Packages[packageName] = new Dictionary<string, SchemaClass>() ;
					notify = true ;
				}
			}
			
			if (notify && Console != null) {
				Console.NewPackage(packageName) ;
			}
			
			broker.IncrementOutstanding() ;
			long seq = SequenceManager.Reserve(Session.CONTEXT_STARTUP) ; 
			IEncoder enc = broker.CreateEncoder('Q', seq) ;			
			enc.WriteStr8(packageName) ;	
			broker.Send(enc) ;
		}