Beispiel #1
0
        /// <summary>
        /// PeerEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal PeerEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            LastGoodVersion = parsed.lastGoodVersion;
            Opennet         = parsed.opennet;
            MyName          = parsed.myName;
            Identity        = parsed.identity;
            Location        = parsed.location;
            Testnet         = parsed.testnet;
            Version         = parsed.version;
            Physical        = new PhysicalType(parsed);
            Ark             = new ArkType(parsed);
            DsaPubKey       = new DsaPubKeyType(parsed);
            DsaGroup        = new DsaGroupType(parsed);
            Auth            = new AuthType(parsed);
            Volatile        = new VolatileType(parsed);
            Metadata        = new MetadataType(parsed);

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// PeerEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal PeerEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            lastGoodVersion = parsed.lastGoodVersion;
            opennet         = parsed.opennet;
            myName          = parsed.myName;
            identity        = parsed.identity;
            location        = parsed.location;
            testnet         = parsed.testnet;
            version         = parsed.version;
            physical        = new PhysicalType(parsed);
            ark             = new ArkType(parsed);
            dsaPubKey       = new DsaPubKeyType(parsed);
            dsaGroup        = new DsaGroupType(parsed);
            auth            = new AuthType(parsed);
            @volatile       = new VolatileType(parsed);
            metadata        = new MetadataType(parsed);

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #3
0
        /// <summary>
        /// NodeDataEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal NodeDataEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            lastGoodVersion = parsed.lastGoodVersion;
            sig             = parsed.sig;
            opennet         = parsed.opennet;
            identity        = parsed.identity;
            version         = parsed.version;
            physical        = new PhysicalType(parsed.physical);
            ark             = new ArkType(parsed.ark);
            dsaPubKey       = new DsaPubKeyType(parsed.dsaPubKey);
            dsaPrivKey      = new DsaPrivKeyType(parsed.dsaPrivKey);
            dsaGroup        = new DsaGroupType(parsed.dsaGroup);
            auth            = new AuthType(parsed.auth);

            clientNonce = parsed.clientNonce;
            location    = parsed.location;
            if (!parsed.location.LastConversionSucessfull)
            {
                location = -1.0;
            }

            if ([email protected]())
            {
                @volatile = new VolatileType(parsed.@volatile);
            }

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// CloseConnectionDuplicateClientNameEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal CloseConnectionDuplicateClientNameEventArgs(MessageParser parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #5
0
        internal SendingToNetworkEventArgs(MessageParser parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// EndListPeerNotesEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal EndListPeerNotesEventArgs(MessageParser parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #7
0
        /// <summary>
        /// PersistentPutDirEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal PersistentPutDirEventArgs(MessageParser parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #8
0
        /// <summary>
        /// URIGeneratedEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal URIGeneratedEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif
            Identifier = parsed.Identifier;
            URI        = parsed.URI;
#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #9
0
        /// <summary>
        /// UnknownPeerNoteTypeEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal UnknownPeerNoteTypeEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            PeerNoteType = parsed.PeerNoteType;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// UnknownNodeIdentifierEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal UnknownNodeIdentifierEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            nodeIdentifier = parsed.NodeIdentifier;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// ExpectedDataLengthEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal ExpectedDataLengthEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif
            identifier = parsed.identifier;
            global     = parsed.global;
            dataLength = parsed.dataLength;
#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #12
0
        /// <summary>
        /// EnterFiniteCooldownEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal EnterFiniteCooldownEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif
            Identifier = parsed.identifier;
            Global     = parsed.global;
            WakeupTime = parsed.wakeupTime;
#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        internal PluginRemovedEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif
            identifier = parsed.Identifier;
            pluginName = parsed.PluginName;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// GeneratedMetadataEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal GeneratedMetadataEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif
            Identifier = parsed.identifier;
            Global     = parsed.global;
            DataLength = parsed.dataLength;
#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// IdentifierCollisionEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal IdentifierCollisionEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            Identifier = parsed.Identifier;
            Global     = parsed.Global;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// ExpectedMIMEEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal ExpectedMimeEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif
            Identifier = parsed.identifier;
            Global     = parsed.global;
            Metadata   = new MetadataType(parsed);

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// PersistentRequestRemovedEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal PersistentRequestRemovedEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            identifier = parsed.Identifier;
            global     = parsed.Global;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        internal ExpectedHashesEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif
            identifier = parsed.Identifier;
            global     = parsed.Global;
            hashes     = new HashesType(parsed.Hashes);

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// StartedCompressionEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal StartedCompressionEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            Identifier = parsed.Identifier;
            Codec      = parsed.Codec;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #20
0
        /// <summary>
        /// PeerRemovedEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal PeerRemovedEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            identity       = parsed.Identity;
            nodeIdentifier = parsed.NodeIdentifier;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #21
0
        /// <summary>
        /// PutFetchableEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal PutFetchableEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            Global     = parsed.Global;
            Identifier = parsed.Identifier;
            URI        = parsed.URI;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #22
0
        /// <summary>
        /// SubscribedUSKEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal SubscribedUSKEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            identifier = parsed.Identifier;
            uri        = parsed.URI;
            dontPoll   = parsed.DontPoll;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #23
0
        /// <summary>
        /// SSKKeypairEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal SSKKeypairEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            InsertURI  = parsed.InsertURI;
            RequestURI = parsed.RequestURI;
            Identifier = parsed.Identifier;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #24
0
        /// <summary>
        /// SubscribedUSKUpdateEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal SubscribedUSKUpdateEventArgs(dynamic parsed)
        {
            #if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
            #endif

            edition    = parsed.Edition;
            identifier = parsed.Identifier;
            uri        = parsed.URI;

            #if DEBUG
            parsed.PrintAccessCount();
            #endif
        }
        /// <summary>
        /// TestDDACompleteEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal TestDDACompleteEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            directory             = parsed.Directory;
            readDirectoryAllowed  = parsed.ReadDirectoryAllowed;
            writeDirectoryAllowed = parsed.WriteDirectoryAllowed;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #26
0
        /// <summary>
        /// TestDDAReplyEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal TestDDAReplyEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            Directory      = parsed.Directory;
            ReadFilename   = parsed.ReadFilename;
            WriteFilename  = parsed.WriteFilename;
            ContentToWrite = parsed.ContentToWrite;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
Beispiel #27
0
        /// <summary>
        /// FinishedCompressionEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal FinishedCompressionEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            identifier     = parsed.Identifier;
            codec          = parsed.Codec;
            originalSize   = parsed.OriginalSize;
            compressedSize = parsed.CompressedSize;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// PeerNoteEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal PeerNoteEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            nodeIdentifier = parsed.NodeIdentifier;
            var enc = new UTF8Encoding();
            noteText     = enc.GetString(Convert.FromBase64String(parsed.NoteText));
            peerNoteType = parsed.PeerNoteType;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// PersistentRequestModifiedEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal PersistentRequestModifiedEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            identifier    = parsed.Identifier;
            global        = parsed.Global;
            clientToken   = parsed.ClientToken;
            priorityClass = parsed.PriorityClass;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }
        /// <summary>
        /// DataFoundEventArgs Constructor
        /// </summary>
        /// <param name="parsed">a simple MessageParse</param>
        internal DataFoundEventArgs(dynamic parsed)
        {
#if DEBUG
            FCP2Protocol.ArgsDebug(this, parsed);
#endif

            contentType = parsed.Metadata.ContentType;
            datalength  = parsed.DataLength;
            global      = parsed.Global;
            identifier  = parsed.Identifier;

#if DEBUG
            parsed.PrintAccessCount();
#endif
        }