Open.TestHarness.Model.ViewTestClass.Activate C# (CSharp) Method

Activate() public method

Loads the Type from the TypeName (if not already activated).
public Activate ( ) : bool
return bool
        public bool Activate()
        {
            // Setup initial conditions.
            if (IsActivated) return true;

            // Attempt to load the assembly.
            try
            {
                Initialize(GetAssembly().GetType(TypeName, true), XapFileName);
            }
            catch (TypeLoadException) { return false; }
            catch (FileNotFoundException) { return false; }

            // Finish up.
            OnPropertyChanged<T>(m => m.DisplayName);
            return true;
        }