Esempio n. 1
0
        public void ExecuteScalar_DefaultValues()
        {
            // Arrange
            SmartObjectClientServer server = null;
            var smartObject = SmartObjectFactory.GetSmartObject(SmartObjectOption.ProcessInfo);

            // Action
            SmartObjectHelper.ExecuteScalar(server, smartObject);
        }
Esempio n. 2
0
        internal SmartObject Deserialize(string serviceObjectName, ServiceInstanceSettings serviceInstanceSettings, string value)
        {
            var smartObject = SmartObjectHelper.GetSmartObject(this, serviceObjectName, serviceInstanceSettings);

            smartObject.MethodToExecute = "Deserialize";
            smartObject.SetInputPropertyValue("Serialized_Item__String_", value);

            SmartObjectHelper.ExecuteScalar(this, smartObject);

            return(smartObject);
        }
Esempio n. 3
0
        internal string SerializeItemToArray(string serviceObjectName, ServiceInstanceSettings serviceInstanceSettings, params Action <SmartObject>[] actions)
        {
            actions.ThrowIfNull("actions");

            var smartObject = SmartObjectHelper.GetSmartObject(this, serviceObjectName, serviceInstanceSettings);

            smartObject.MethodToExecute = "SerializeItemToArray";

            foreach (var action in actions)
            {
                action(smartObject);
            }

            SmartObjectHelper.ExecuteScalar(this, smartObject);

            return(smartObject.Properties["Serialized_Array"].Value);
        }
Esempio n. 4
0
        internal string Serialize(string serviceObjectName, ServiceInstanceSettings serviceInstanceSettings, params Action <SmartObject>[] actions)
        {
            actions.ThrowIfNull("actions");

            var smartObject = SmartObjectHelper.GetSmartObject(this, serviceObjectName, serviceInstanceSettings);

            smartObject.MethodToExecute = "Serialize";

            foreach (var action in actions)
            {
                action(smartObject);
            }

            var serialized = SmartObjectHelper.ExecuteScalar(this, smartObject);

            return(serialized.GetReturnPropertyValue("Serialized_Item__String_"));
        }