示例#1
0
        sealed internal override void OnInternalCacheMetadata(bool createEmptyBindings)
        {
            Activity body = null;

            if (this.Implementation != null)
            {
                body = this.Implementation();
            }

            if (body != null)
            {
                SetImplementationChildrenCollection(new Collection <Activity> {
                    body
                });
            }

            // Always cache the last body that we returned
            this.runtimeImplementation = body;

            ReflectedInformation information = new ReflectedInformation(this);

            SetImportedChildrenCollection(information.GetChildren());
            SetVariablesCollection(information.GetVariables());
            SetImportedDelegatesCollection(information.GetDelegates());
            SetArgumentsCollection(information.GetArguments(), createEmptyBindings);
        }
        protected virtual void CacheMetadata(NativeActivityMetadata metadata)
        {
            ReflectedInformation information = new ReflectedInformation(this);

            // We bypass the metadata structure to avoid the checks for null entries
            SetArgumentsCollection(information.GetArguments(), metadata.CreateEmptyBindings);
            SetChildrenCollection(information.GetChildren());
            SetDelegatesCollection(information.GetDelegates());
            SetVariablesCollection(information.GetVariables());
        }
示例#3
0
 protected virtual void CacheMetadata(CodeActivityMetadata metadata)
 {
     // We bypass the metadata call to avoid the null checks
     SetArgumentsCollection(ReflectedInformation.GetArguments(this), metadata.CreateEmptyBindings);
 }
示例#4
0
        protected virtual void CacheMetadata(NativeActivityMetadata metadata)
        {
            ReflectedInformation information = new ReflectedInformation(this);

            // We bypass the metadata structure to avoid the checks for null entries
            SetArgumentsCollection(information.GetArguments(), metadata.CreateEmptyBindings);
            SetChildrenCollection(information.GetChildren());
            SetDelegatesCollection(information.GetDelegates());
            SetVariablesCollection(information.GetVariables());
        }
        sealed internal override void OnInternalCacheMetadata(bool createEmptyBindings)
        {
            Activity body = null;
            if (this.Implementation != null)
            {
                body = this.Implementation();
            }

            if (body != null)
            {
                SetImplementationChildrenCollection(new Collection<Activity> { body });
            }

            // Always cache the last body that we returned
            this.runtimeImplementation = body;

            ReflectedInformation information = new ReflectedInformation(this);

            SetImportedChildrenCollection(information.GetChildren());
            SetVariablesCollection(information.GetVariables());
            SetImportedDelegatesCollection(information.GetDelegates());
            SetArgumentsCollection(information.GetArguments(), createEmptyBindings);
        }