// constructors /// <summary> /// /// </summary> /// <param name="moduleInfo"></param> /// <param name="cryptoManager"></param> /// <param name="itemKind"></param> /// <param name="transient"></param> /// <param name="appScope"></param> /// <param name="name"></param> /// <param name="props"></param> /// <param name="data"></param> /// <param name="dataType"></param> /// <param name="serialFormat"></param> /// <param name="lifetime"></param> public ServerItem( IModuleInfo moduleInfo, ICryptoManager cryptoManager, ItemKind itemKind, bool transient, string appScope, string name, NamedValueSet props, object data, Type dataType, SerialFormat serialFormat, TimeSpan lifetime) : base(itemKind, transient, name, appScope) { _moduleInfo = moduleInfo ?? throw new ArgumentNullException(nameof(moduleInfo)); _cryptoManager = cryptoManager ?? throw new ArgumentNullException(nameof(cryptoManager)); if (dataType == null) { throw new ArgumentNullException(nameof(dataType)); } SysProps.Set(SysPropName.SAlg, (int)serialFormat); AppProps.Add(props); _data = data; _dataTypeType = dataType; DataTypeName = dataType.FullName; _lifetime = lifetime; }
/// <summary> /// /// </summary> /// <param name="itemKind"></param> /// <param name="transient"></param> /// <param name="appScope"></param> /// <param name="name"></param> /// <param name="props"></param> /// <param name="serialisedData"></param> /// <param name="dataTypeName"></param> /// <param name="lifetime"></param> public ServerItem( ItemKind itemKind, bool transient, string appScope, string name, NamedValueSet props, string serialisedData, string dataTypeName, TimeSpan lifetime) : base(itemKind, transient, name, appScope) { AppProps.Add(props); _text = serialisedData; SysProps.Set(SysPropName.SAlg, (int)SerialFormat.Undefined); DataTypeName = dataTypeName; _lifetime = lifetime; }