问题标签 [mdriven]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
mdriven - 控制 MDriven 中的默认语言(本地化)
我正在使用MDriven wiki支持,但想控制默认语言。现在它将恢复为使用的原始值。我的问题是,如果设置为“法语”的浏览器将以(设计语言,瑞典语)而不是首选英语呈现 UI
mdriven - Viewmodelhelper.createfromViewmodel 方法中的错误
在 MVC 4 Web 应用程序中,使用 Mdriven 框架版本是 7.0.12531 来访问来自 SQL 2014 express 的数据。
我们在尝试使用 viewmodel xml(其中包含 OCL)获取数据时遇到错误,错误是(“bughuntinfo internaleval:83 es 似乎fineObject reference not set to an instance of an object.”)
在 Eco.Ocl.Impl.OclImplBase.InternalEvaluate(字符串 oclExpression,IElement rootElement,IClassifier 上下文,SubscriberPairsubscriberPair,IExternalVariableList 变量列表)在 Eco.Ocl.Impl.OclServiceImpl.BaseEvaluate(IElement 根,IClassifier 上下文,IExternalVariableList 变量,字符串表达式)在Eco.Ocl.Impl.OclServiceImpl.Evaluate(IElement root, String expression, IExternalVariableList vars) 在 Eco.ViewModel.Runtime.ViewModelClass.CollectObjectsForCONstraintsCheck(IObjectList allobjects) 在 Eco.ViewModel.Runtime.ViewModel.UpdateErrorsFromConstraints(列表
1 errors, List
1 警告,列表1 info, ISubscriber subscriber) at Eco.ViewModel.Runtime.ViewModelClass.ModernQueryPlanExpressionsRunToFindMissing(IElement root, Boolean runallnotsparse, Boolean doStructureNotLevel) at Eco.ViewModel.Runtime.ViewModel.ModernQueryPlanLoop(IFetchConsolidationService fetchconsolidation, Boolean doStructureNotLevel) at Eco.ViewModel.Runtime.ViewModel.ModernQueryPlanExecute(Action doFirstThingInsideQueryPlanAction) at Eco.ViewModel.Runtime.ViewModel.<EnsureSpanFetch>b__42_0() at Eco.Services.Impl.AsyncSupportServiceImpl.WrapTaskInStandardExceptionHandling(Action task) at Eco.Services.Impl.AsyncSupportServiceImpl.PerformTaskNowIfInAsyncThread(Action task) at Eco.ViewModel.Runtime.ViewModel.EnsureSpanFetch() at Eco.ViewModel.Runtime.ViewModel.<>c__DisplayClass156_0.<SetElement>b__0() at Eco.Services.Impl.AsyncSupportServiceImpl.WrapTaskInStandardExceptionHandling(Action task) at Eco.Services.Impl.AsyncSupportServiceImpl.PerformTaskNowIfInAsyncThread(Action task) at Eco.ViewModel.Runtime.ViewModel.SetElement(IEcoObject obj) at Eco.ViewModel.Runtime.ViewModel.set_RootObject(IEcoObject value) at Eco.ViewModel.Runtime.VMClass.UpdateContent(IElement value, Boolean skipCheckOfBeingRoot) at Eco.ViewModel.Runtime.VMClass.set_Content(IElement value) at Eco.ViewModel.Runtime.VMClass..ctor(VMClassDescriptor vMClassDescriptor, IEcoServiceProvider sp, VMClass ownedby, IElement content, IExternalVariableList variables, Boolean useDisplayQueueDrivenAutoPopulate) at Eco.ViewModel.Runtime.VMClassDescriptor.CreateInstance(IEcoServiceProvider sp, IEcoObject iEcoObject, IExternalVariableList iExternalVariableList, Boolean useDisplayQueueDrivenAutoPopulate) at Eco.ViewModel.Runtime.ViewModelHelper.ActOnVMClassFromViewModelRTCreator_WithOptionalVMClassSupplied(VMClass optionalVMClass, VMClassFromViewModelRTCreator x, IEcoObject root, Boolean useDisplayQueueDrivenAutoPopulate) at Eco.ViewModel.Runtime.ViewModelHelper.ActOnVMClassFromViewModelRTCreator(VMClassFromViewModelRTCreator x, IEcoObject root, Boolean useDisplayQueueDrivenAutoPopulate) at Eco.ViewModel.Runtime.ViewModelHelper.CreateFromViewModel(Type esType, EcoSpace es, IEcoObject root, ViewModelRTCreator vmc_c, GetVMClassTypeDelegate creator, IViewUICreator externalViewUICreator, Action
1 initViewModelAction, Boolean useDisplayQueueDrivenAutoPopulate, IEcoServiceProvider spToUse) 在 Eco.ViewModel.Runtime.ViewModelHelper.CreateFromViewModel(Type esType, EcoSpace es, IEcoObject root, ViewModelRTCreator vmc_c, GetVMClassTypeDelegate creator, Boolean useDisplayQueueDrivenAutoPopulate, IEcoServiceProvider spToUse) 在 Eco.ViewModel.Runtime.ViewModelHelper。在 Eco.ViewModel.Runtime.ViewModelHelper.CreateFromViewModel(String viewmodelName, EcoSpace es, IEcoObject root, GetVMClassTypeDelegate creator, Boolean useDisplayQueueDrivenAutoPopulate) 在 Eco.ViewModel.Runtime 的 CreateFromViewModel(EcoSpace es, IEcoObject root, ViewModelRTCreator vmc_c, GetVMClassTypeDelegate creator, Boolean useDisplayQueueDrivenAutoPopulate)。 ViewModelHelper.CreateFromViewModel(String viewmodelName, EcoSpace es, IEcoObject root)
mdriven - 如何控制注销行为?
我的 Web 应用程序已通过 OpenID 连接登录。当我测试注销按钮时,我被重定向到配置的注销 URL,但是当我再次尝试登录时,我已经登录了。
我希望它像这样工作:
- 当我注销时,我已注销。
- X 分钟过去后,我会自动注销,如果我尝试在浏览器窗口中执行某些操作,我将被重定向到“您尚未登录”页面。
如何控制会话?或者,注销按钮的功能?
mdriven - MDriven 中的模拟?
我正在尝试构建一个“模拟”页面,以便以另一个用户的身份“登录”。因此,我试图为 CurrenUser 分配一个 vCurrent_XXXX 值,但结果是 CurrentUser 设置为 null ?我该如何控制?
mdriven - 出于测试原因设置状态机的状态
为了实现单元测试,我需要设置对象的特定状态。由于状态是用状态机实现的,MDriven 拒绝将状态值直接分配给属性。
我可能会通过完整的状态机触发,直到达到所需的状态,但我认为有一种更简单的方法可以将状态设置为一个相当隐藏的特定值,因为它通常不应该以这种方式工作。
有谁知道如何做到这一点?
visual-studio - 在 Visual Studio .NET Standard 项目中打开 MDriven EcoSpace 或 PMP 组件设计器时出错
我创建了一个新的 .netstandard2.0 MDrivenEcoSpaceAndModelForNetStandard2 项目。创建它时,我无法打开生态空间或 PMP 组件设计器。我正在使用 Microsoft Visual Studio Enterprise 2019 版本 16.8.4 和 MDriven 框架版本 7.0.0.12868。打开 PMP 时出现以下错误。(顺便说一句,谢谢,我很高兴看到对 .net 标准的支持。期待解决这个组件设计器问题并且一切正常。将我的所有项目转换为 .net 标准/核心是一条很长的路)。任何帮助是极大的赞赏。
“自定义属性签名中不支持的类型参数。”
此错误的实例 (1)
调用堆栈
在 Microsoft.MetadataReader.SignatureUtil.GetTypeId(Type type) 在 Microsoft.MetadataReader.MetadataOnlyModule.GetConstructorArguments(ConstructorInfo constructorInfo, Byte[] customAttributeBlob, Int32& index) 在 Microsoft.MetadataReader.MetadataOnlyModule.LazyAttributeParse(Token token, ConstructorInfo constructorInfo, IList1& constructorArguments, IList
1& namedArguments) 在 Microsoft.MetadataReader.MetadataOnlyCustomAttributeData.InitArgumentData() 在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.ConstructAttribute(CustomAttributeData data) 在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil 在 Microsoft.MetadataReader.MetadataOnlyCustomAttributeData.get_ConstructorArguments()。 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetCustomAttributes(类型类型,类型过滤器,布尔继承,CustomAttributesCache 缓存)在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkType.GetCustomAttributes(类型)的 GetCustomAttributes(ICustomAttributesDataProvider 成员,类型筛选器,CustomAttributesCache 缓存)过滤器,布尔继承)在 Microsoft.VisualStudio.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(类型类型,类型过滤器)在 Microsoft.VisualStudio。Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(MemberInfo member, Type filter) 在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.get_Attributes() 在 Microsoft.VisualStudio.Design.VSDesignSurface.EnsureExtensions(IComponent component) 在 Microsoft.VisualStudio.Design.VSDesignSurface .CreateInstance(类型类型)在 System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(类型 componentType,字符串名称)在 System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(类型类型,ICollection 参数, System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance 处的字符串名称,布尔 addToContainer)(类型类型,ICollection 参数,字符串名称,Boolean addToContainer) 在 System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration) 在 System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) 在 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader .PerformLoad(IDesignerSerializationManager serializationManager) --- 在 Microsoft.VisualStudio.Design.Serialization 上的 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) 上的异常发生位置的堆栈跟踪结束。 CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)OnLoadCompleted(Int32 fReload)
打开生态空间时调用堆栈略有不同:
此错误的实例 (1)
调用堆栈
在 Microsoft.MetadataReader.SignatureUtil.GetTypeId(Type type) 在 Microsoft.MetadataReader.MetadataOnlyModule.GetConstructorArguments(ConstructorInfo constructorInfo, Byte[] customAttributeBlob, Int32& index) 在 Microsoft.MetadataReader.MetadataOnlyModule.LazyAttributeParse(Token token, ConstructorInfo constructorInfo, IList1& constructorArguments, IList
1& namedArguments) 在 Microsoft.MetadataReader.MetadataOnlyCustomAttributeData.InitArgumentData() 在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.ConstructAttribute(CustomAttributeData data) 在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil 在 Microsoft.MetadataReader.MetadataOnlyCustomAttributeData.get_ConstructorArguments()。 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkUtil.GetCustomAttributes(类型类型,类型过滤器,布尔继承,CustomAttributesCache 缓存)在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkType.GetCustomAttributes(类型)的 GetCustomAttributes(ICustomAttributesDataProvider 成员,类型筛选器,CustomAttributesCache 缓存)过滤器,布尔继承)在 Microsoft.VisualStudio.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(类型类型,类型过滤器)在 Microsoft.VisualStudio。Shell.Design.VsTargetFrameworkAttributeCollection.GetAttributes(MemberInfo member, Type filter) 在 Microsoft.VisualStudio.Shell.Design.VsTargetFrameworkAttributeCollection.get_Attributes() 在 Microsoft.VisualStudio.Design.VSDesignSurface.EnsureExtensions(IComponent component) 在 Microsoft.VisualStudio.Design.VSDesignSurface .CreateInstance(类型类型)在 System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(类型 componentType,字符串名称)在 System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(类型类型,ICollection 参数, System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance 处的字符串名称,布尔 addToContainer)(类型类型,ICollection 参数,字符串名称,Boolean addToContainer) 在 System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration) 在 System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) 在 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader .PerformLoad(IDesignerSerializationManager serializationManager) --- 在 Microsoft.VisualStudio.Design.Serialization 上的 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) 上的异常发生位置的堆栈跟踪结束。 CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)OnLoadCompleted(Int32 fReload)
viewmodel - MDriven ViewModel 增强请求
我已经使用 MDriven Framework 很多年了,我非常喜欢它。我的所有模型对象都有一个基类,最近我开始使用 MDriven ViewModels。在我为我的视图模型使用常规的 MDriven 非持久模型对象之前。
我想要的增强功能是能够为 ViewModel 指定一个基类。当然,指定的基类需要从 VMClass 继承。
这样做的好处是我可以像在模型类上一样在 VM 上实现接口。然后我可以拥有不需要检查 VMClass 的通用代码,并为它与模型类执行不同的逻辑。我有很多通用代码来检查约束和执行视图逻辑,这个特性会很有帮助。
谢谢,布赖恩
visual-studio-2019 - 在 vs2019 社区中打开 MDriven Prototyper 时出错
我正在尝试 MDriven 框架,并根据提供的模板创建了一个基本应用程序。更新模型并生成代码文件后,单击原型按钮会给我这个错误:
我尝试了一些方法,例如添加 nuget 包并检查下载文件中 dll 的不同版本。似乎提供的版本不正确。
任何人都有一些指示,解决方案?