public override object[] GetContextConstructorArguments(IConnectionInfo cxInfo) { var connInfo = CassandraConnectionInfo.Load(cxInfo); CacheDefinitionIfNessisary(connInfo); return(new[] { connInfo.CreateContext() }); }
public override ParameterDescriptor[] GetContextConstructorParameters(IConnectionInfo cxInfo) { var connInfo = CassandraConnectionInfo.Load(cxInfo); CacheDefinitionIfNessisary(connInfo); return(new[] { new ParameterDescriptor("context", "FluentCassandra.CassandraContext") }); }
/// <summary>Returns the text to display in the root Schema Explorer node for a given connection info.</summary> public override string GetConnectionDescription(IConnectionInfo cxInfo) { var connInfo = CassandraConnectionInfo.Load(cxInfo); CacheDefinitionIfNessisary(connInfo); return(String.Format("{0}/{1} - {2}", connInfo.Host, connInfo.Port, connInfo.Keyspace)); }
public override List <ExplorerItem> GetSchemaAndBuildAssembly(IConnectionInfo cxInfo, AssemblyName assemblyToBuild, ref string nameSpace, ref string typeName) { var connInfo = CassandraConnectionInfo.Load(cxInfo); CacheDefinitionIfNessisary(connInfo); return(SchemaBuilder.GetSchemaAndBuildAssembly( connInfo, GetDriverFolder(), assemblyToBuild, ref nameSpace, ref typeName)); }
/// <summary>Displays a dialog prompting the user for connection details. The isNewConnection /// parameter will be true if the user is creating a new connection rather than editing an /// existing connection. This should return true if the user clicked OK. If it returns false, /// any changes to the IConnectionInfo object will be rolled back.</summary> public override bool ShowConnectionDialog(IConnectionInfo cxInfo, bool isNewConnection) { CassandraConnectionInfo connInfo; connInfo = isNewConnection ? new CassandraConnectionInfo { ConntectionInfo = cxInfo } : CassandraConnectionInfo.Load(cxInfo); var win = new ConnectionDialog(connInfo); var result = win.ShowDialog() == true; if (result) { connInfo.Save(); } CacheDefinitionIfNessisary(connInfo); return(result); }