/// <summary>
 /// Sets the specified NEO Storage Key field values.
 /// </summary>
 /// <param name="nsk">NSK</param>
 /// <param name="vau">vau</param>
 /// <param name="userScriptHash">userScriptHash</param>
 /// <param name="className">class name</param>
 /// <param name="index">index</param>
 /// <param name="fieldName">field name</param>
 /// <returns>void</returns>
 public static void Set(NeoStorageKey nsk, NeoVersionedAppUser vau, byte[] userScriptHash, string className, int index, string fieldName)
 {
     nsk._major          = NeoVersionedAppUser.GetMajor(vau); nsk._minor = NeoVersionedAppUser.GetMinor(vau); nsk._build = NeoVersionedAppUser.GetBuild(vau); /*nsk._revision = NeoVersionedAppUser.GetRevision(vau);*/
     nsk._userScriptHash = NeoVersionedAppUser.GetUserScriptHash(vau);
     nsk._className      = className.AsByteArray(); nsk._index = index; nsk._fieldName = fieldName;
     nsk._state          = NeoEntityModel.EntityState.SET;
 }
        /// <summary>
        /// News the specified vau.
        /// </summary>
        /// <param name="vau">vau</param>
        /// <param name="className">class name</param>
        /// <returns>NeoStorageKey</returns>
        public static NeoStorageKey New(NeoVersionedAppUser vau, string className)
        {
            if (NeoVersionedAppUser.IsNull(vau))
            {
                return(NeoStorageKey.Null());
            }

            NeoStorageKey nsk = new NeoStorageKey();

            nsk._app   = NeoVersionedAppUser.GetAppNameAsByteArray(vau);
            nsk._major = NeoVersionedAppUser.GetMajor(vau);
            nsk._minor = NeoVersionedAppUser.GetMinor(vau);
            nsk._build = NeoVersionedAppUser.GetBuild(vau);
            //nsk._revision = NeoVersionedAppUser.GetRevision(vau);
            nsk._userScriptHash = NeoVersionedAppUser.GetUserScriptHash(vau);
            nsk._className      = className.AsByteArray();
            nsk._index          = 0;
            nsk._fieldName      = "";
            nsk._state          = NeoEntityModel.EntityState.INIT;
            LogExt("New(vau,sc).nsk", nsk);
            return(nsk);
        }