Exemplo n.º 1
0
        // This will execute after OnFindRange.
        public override void PreExecute(RefactorCommand[] commands, int i)
        {
            Contract.Requires(commands != null, "commands is null");

            // If there are no bases and we're the last AddBase command then we
            // need to use a colon for the prefix, otherwise we need to use a comma.
            if (m_type.Bases.Names.Length == 0)
            {
                if (i + 1 < commands.Length && Array.FindIndex(commands, i + 1, c => c is AddBaseType) >= 0)
                    m_prefix = ", ";
                else
                    m_prefix = " : ";
            }
        }
Exemplo n.º 2
0
 // Allows commands to change what they insert (but not where they insert) based on
 // the other commands to be executed. I is the index of this. Commands after index
 // i are executed after this.
 public virtual void PreExecute(RefactorCommand[] commands, int i)
 {
     Contract.Requires(commands != null, "commands is null");
 }