Load() public static method

public static Load ( IConnectionInfo cxInfo ) : RavenConnectionDialogViewModel
cxInfo IConnectionInfo
return RavenConnectionDialogViewModel
Ejemplo n.º 1
0
        public override object[] GetContextConstructorArguments(IConnectionInfo cxInfo)
        {
            _connInfo = RavenConnectionDialogViewModel.Load(cxInfo);
// ReSharper disable CoVariantArrayConversion
            return(new[] { _connInfo });
// ReSharper restore CoVariantArrayConversion
        }
Ejemplo n.º 2
0
        public override void InitializeContext(IConnectionInfo cxInfo, object context, QueryExecutionManager executionManager)
        {
            _connInfo = RavenConnectionDialogViewModel.Load(cxInfo);

            var rc = (RavenContext)context;

            rc.LogWriter = executionManager.SqlTranslationWriter;
        }
Ejemplo n.º 3
0
        public override bool ShowConnectionDialog(IConnectionInfo cxInfo, bool isNewConnection)
        {
            _connInfo = isNewConnection
                ? new RavenConnectionDialogViewModel {
                CxInfo = cxInfo
            }
                : RavenConnectionDialogViewModel.Load(cxInfo);

            var win    = new RavenConectionDialog(_connInfo);
            var result = win.ShowDialog() == true;

            if (result)
            {
                _connInfo.Save();
                cxInfo.CustomTypeInfo.CustomAssemblyPath = Assembly.GetAssembly(typeof(RavenContext)).Location;
                cxInfo.CustomTypeInfo.CustomTypeName     = "RavenLinqpadDriver.RavenContext";
            }

            return(result);
        }
Ejemplo n.º 4
0
        public override ParameterDescriptor[] GetContextConstructorParameters(IConnectionInfo cxInfo)
        {
            _connInfo = RavenConnectionDialogViewModel.Load(cxInfo);

            return(new[] { new ParameterDescriptor("connInfo", "RavenLinqpadDriver.RavenConnectionDialogViewModel") });
        }
Ejemplo n.º 5
0
 public override string GetConnectionDescription(IConnectionInfo cxInfo)
 {
     _connInfo = RavenConnectionDialogViewModel.Load(cxInfo);
     return(string.Format("RavenDB: {0}", _connInfo.Name));
 }