Ecologylab.BigSemantics.Actions.SemanticOperation.Perform C# (CSharp) Method

Perform() public abstract method

public abstract Perform ( Object obj ) : Object
obj Object
return Object
        public abstract Object Perform(Object obj);

Usage Example

Example #1
0
        ///<summary>
        ///handle semantic actions other than FOR and IF.
        ///</summary>
        public void HandleGeneralOperation(SemanticOperation operation)
        {
            // get the object on which the action has to be taken
            String objectName = operation.ObjectStr;

            if (objectName == null)
            {
                objectName = SemanticOperationKeyWords.Metadata;
            }
            Object obj = semanticOperationVariableMap.Get(objectName);

            try
            {
                Object returnValue = null;
                returnValue = operation.Perform(obj);
                if (requestWaiting)
                {
                    return;
                }
                if (operation.Name != null && returnValue != null)
                {
                    semanticOperationVariableMap.Put(operation.Name, returnValue);
                }
            }
            catch (Exception e)
            {
                if (e is SemanticOperationExecutionException)
                {
                    throw e;
                }
                throw new SemanticOperationExecutionException(e, operation, semanticOperationVariableMap);
            }
        }