示例#1
0
    public Profile(global::Omnius.Core.Cryptography.OmniSignature signature, global::Omnius.Core.RocketPack.Timestamp creationTime, global::Omnius.Axis.Intaractors.Models.ProfileContent content)
    {
        if (signature is null)
        {
            throw new global::System.ArgumentNullException("signature");
        }
        if (content is null)
        {
            throw new global::System.ArgumentNullException("content");
        }

        this.Signature    = signature;
        this.CreationTime = creationTime;
        this.Content      = content;

        ___hashCode = new global::System.Lazy <int>(() =>
        {
            var ___h = new global::System.HashCode();
            if (signature != default)
            {
                ___h.Add(signature.GetHashCode());
            }
            if (creationTime != default)
            {
                ___h.Add(creationTime.GetHashCode());
            }
            if (content != default)
            {
                ___h.Add(content.GetHashCode());
            }
            return(___h.ToHashCode());
        });
    }
示例#2
0
        public FileMeta(global::Omnius.Lxna.Components.Models.NestedPath path, ulong length, global::Omnius.Core.RocketPack.Timestamp lastWriteTime)
        {
            if (path is null)
            {
                throw new global::System.ArgumentNullException("path");
            }
            this.Path          = path;
            this.Length        = length;
            this.LastWriteTime = lastWriteTime;

            ___hashCode = new global::System.Lazy <int>(() =>
            {
                var ___h = new global::System.HashCode();
                if (path != default)
                {
                    ___h.Add(path.GetHashCode());
                }
                if (length != default)
                {
                    ___h.Add(length.GetHashCode());
                }
                if (lastWriteTime != default)
                {
                    ___h.Add(lastWriteTime.GetHashCode());
                }
                return(___h.ToHashCode());
            });
        }