/// <summary> /// Opens a workspace in a instance of Mapinfo. /// </summary> /// <param name="workspacePath">The path to the workspace which needs to be opened.</param> /// <returns>A instance of a <see cref="Workspace"/> which can be used to get infomation about the opened workspace.</returns> public static Workspace OpenWorkspace(string workspacePath) { IMapinfoWrapper wrapper = ServiceLocator.GetInstance <IMapinfoWrapper>(); wrapper.RunCommand("Run Application {0}".FormatWith(workspacePath.InQuotes())); return(new Workspace()); }
/// <summary> /// Creates a new instace of the <see cref="T:MapinfoLogger"/> object. /// </summary> /// <param name="mapinfoInstance">The instance of Mapinfo to log against.</param> /// <param name="doCommandLogAction">The action that will be invoked before the RunCommand is run.</param> /// <param name="evalCommandLogAction">The action that will be invoked before the Evaluate command is run.</param> /// <param name="evalReturnLogAction">The action that will be invoked after the Evaluate command in run, this action is passed the result /// of the Evaluate command.</param> public MapinfoLogger(IMapinfoWrapper mapinfoInstance, Action <String> doCommandLogAction, Action <String> evalCommandLogAction, Action <String> evalReturnLogAction) { this.mapinfo = mapinfoInstance; this.action = doCommandLogAction; this.evalaction = evalCommandLogAction; this.returnevalaction = evalReturnLogAction; }
internal Variable(string name, VariableType declareAs, bool isAssigned, IMapinfoWrapper wrapper) { this.name = name; this.type = declareAs; this.isAssigned = isAssigned; this.wrapper = wrapper ?? ServiceLocator.GetInstance <IMapinfoWrapper>(); }
/// <summary> /// Run the ObjectInfo mapbasic command in Mapinfo, and returns a string containing the result. /// </summary> /// <param name="variable">The variable used by the ObjectInfo call.</param> /// <param name="attribute">The attribute specifying which information to return.</param> /// <returns>A string containing the retured result from calling the ObjectInfo command in Mapinfo.</returns> public static string ObjectInfo(IVariable variable, ObjectInfoEnum attribute) { IMapinfoWrapper wrapper = ServiceLocator.GetInstance <IMapinfoWrapper>(); string expression = variable.GetExpression(); string returnedstring = wrapper.Evaluate("ObjectInfo({0},{1})".FormatWith(expression, (int)attribute)); return(returnedstring); }
public static void WireUp(IMapinfoWrapper mapinfoInstance) { DependencyResolver resolver = new DependencyResolver(); IFactoryBuilder builder = new FactoryBuilder(mapinfoInstance); resolver.Register <IMapinfoWrapper>(mapinfoInstance); resolver.Register <IFactoryBuilder>(builder); ServiceLocator.Initialize(resolver); }
public VariableFactory(IMapinfoWrapper mapinfoInstance) { this.wrapper = mapinfoInstance ?? ServiceLocator.GetInstance <IMapinfoWrapper>(); }
public DataReader(IMapinfoWrapper wrapper, string tableName, IGeometryFactory geometryFactory) { this.wrapper = wrapper; this.tableName = tableName; this.geometryfactory = geometryFactory; }
internal MapWindow(IMapinfoWrapper wrapper, int mapNumber) { this.mapinfoinstance = wrapper ?? ServiceLocator.GetInstance <IMapinfoWrapper>(); this.mapnumber = mapNumber; }
public TableCommandRunner(IMapinfoWrapper mapinfo) { this.wrapper = mapinfo ?? ServiceLocator.GetInstance <IMapinfoWrapper>(); }
/// <summary> /// Creates a new SystemInfo object used to retive information /// about the current instace of mapinfo. /// </summary> /// <param name="mapinfoWrapper">A wrapper object containing the running instace of mapinfo.</param> internal SystemInfo(IMapinfoWrapper mapinfoWrapper) { this.wrapper = mapinfoWrapper ?? ServiceLocator.GetInstance <IMapinfoWrapper>(); }
internal Layer(IMapinfoWrapper mapinfoInstance, string layerName) { this.layername = layerName; this.wrapper = mapinfoInstance ?? ServiceLocator.GetInstance <IMapinfoWrapper>(); }
public GeometryFactory(IMapinfoWrapper mapinfoInstance, IVariableFactory variableFactory) { this.wrapper = mapinfoInstance; this.variablefactory = variableFactory; }
public MapinfoSession(IMapinfoWrapper mapinfoAPI) { this.mapinfo = mapinfoAPI; this.LoadOptions = null; }
public Point(Variable variable, IMapinfoWrapper session) : base(variable, session) { }
public Geometry(Variable variable, IMapinfoWrapper mapinfoSession) { this.Variable = variable; this.Mapinfo = mapinfoSession; }
public void IsWiredUp() { IMapinfoWrapper wrapper = IoC.Resolve <IMapinfoWrapper>(); Assert.AreSame(mockmapinfo.Object, wrapper); }
public TableInfo(IMapinfoWrapper wrapper) { // use from cache if not supplied, could create new here this.wrapper = wrapper ?? Publics.InternalMapInfo; }
public TableInfo(IMapinfoWrapper wrapper) { // use from cache if not supplied this.wrapper = wrapper ?? Publics.InternalMapInfo; }
internal MapbasicObject(IVariable variable, IMapinfoWrapper wrapper) { this.innervariable = variable; this.mapinfoinstance = wrapper ?? ServiceLocator.GetInstance <IMapinfoWrapper>(); }
public FactoryBuilder(IMapinfoWrapper mapinfoInstance) { this.wrapper = mapinfoInstance; }
public MapinfoQueryProvider(IMapinfoWrapper wrapper) { this.wrapper = wrapper; }
internal Layer(IMapinfoWrapper mapinfoInstance, int layerNumber) { this.layernumber = layerNumber; this.wrapper = mapinfoInstance; }
public MapbasicWrapper(IMapinfoWrapper Session) { this.session = Session; }