상속: FunctionElement, ISupportInitialize
    public DesignSurfaceController(DesignSurface surface, FunctionDefinition workflow)
    {
      CompositionInitializer.SatisfyImports(this);

      _surface = surface;
      Workflow = workflow;

      InitializeWorkflowDefinition();
      InitializeSurface();
      CreateDefaultOutputActivity();
    }
    public void LoadXml(XElement data)
    {
      TeardownWorkflowDefinition();

      var definition = new FunctionDefinition();
      definition.LoadXml(data);

      if (data != null)
      {
        definition.BeginInit();

        var activities = data.Element("Activities").Elements();
        foreach (var activity in activities.Select(ParseActivity).Where(a => a != null))
          definition.AddItem(activity);

        var links = data.Element("References").Elements();
        foreach (var link in links.Select(ParseLink).Where(l => l != null))
          definition.AddItem(link);

        definition.EndInit();
      }

      Workflow = definition;
      InitializeWorkflowDefinition();
    }