Comments (4)
Hello!
EmbedHostObject
method allows to embed instances of simple classes (or structures) and delegates. Unfortunately, generic and nullable types do not belong to simple classes and structures. You can use a DateTime
instead of a DateTime?
.
Don't forget to wrap your code in a using
block.
from msiejavascriptengine.
Thank you.
from msiejavascriptengine.
public class DateTimeNull
{
private DateTime? datetime;
public bool HasValue { get { return datetime != null ? datetime.HasValue : false; } }
public DateTime Value { get { return datetime.Value; } }
public static implicit operator DateTimeNull(DateTime value)
{
DateTimeNull date = new DateTimeNull();
date.datetime = value;
return date;
}
public static implicit operator DateTimeNull(DateTime? value)
{
DateTimeNull date = new DateTimeNull();
date.datetime = value;
return date;
}
}
DateTimeNull
instead of DateTime
, test passed.
from msiejavascriptengine.
In future, I will try to solve this problem. I just now have other priorities. I try to spend all my free time on development of third versions of the MSIE JavaScript Engine and the JavaScript Engine Switcher. Because of this, even had to suspend development of the WebMarkupMin.
from msiejavascriptengine.
Related Issues (17)
- Parsing JSLint HOT 2
- Async/Await / Promises support HOT 6
- Движок имеет ограничение на количество include файлов в Less HOT 6
- AccessViolationException HOT 7
- Anonymous Host Objects HOT 1
- What's the purpose of using MsieJavaScriptEngine? HOT 3
- crash in windows 8 / VS 2015 HOT 9
- Block finalizer solved? HOT 8
- Documentation? HOT 10
- execute code from different threads HOT 6
- Binaries in source folders HOT 5
- Pass in JavaScript object reference to CallFunction HOT 2
- JsEngineLoadException: During loading of MSIE JavaScript engine error has occurred. HOT 11
- "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." HOT 21
- How to get data back from JS to C#? HOT 1
- Engine is crashing after Windows 10 anniversary update HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msiejavascriptengine.