Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum

CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • C#/XAML for HTML5

    rated by 0 users
    This post has 3 Replies | 1 Follower

    Top 500 Contributor
    Posts 33
    wilfreds Posted: Wed, Jun 10 2015 6:35 AM

    Yes, that's true. But don't want to set the bar too high.

    Opened the Csla.winrt solution. Created a new project of type "Empty Class Library (C#/XAML for HTML5) named Csla.CSHTML5. Changed the namespace to "Csla" Added conditional symbol SILVERLIGHT. Copied all the files and linked files from Csla.Silverlight project by editing the Csla.CSHTML5.csproj in a text editor.

    Ended up with errors as expected. A lot of them them ambiguous reference between 'System.NonSerializedAttribute' and 'Csla.Serialization.NonSerializedAttribute' and between 'System.SerializableAttribute' and 'Csla.Serialization.SerializableAttribute'. That I don't know how to get rid of.

    Browsing the project looking at the using statements I can see that these are missing:
    using System.ComponentModel.DataAnnotations;
    using System.Net.Http;
    using System.Text.RegularExpressions;
    using System.Xml.Linq;

    Also I noticed that IEditableObject, INotifyDataErrorInfo, INotifyPropertyChanging, System.ComponentModel.BackgroundWorker, DoWorkEventHandler, RunWorkerCompletedEventHandler, ProgressChangedEventHandler, System.ComponentModel.AsyncCompletedEventArgs, XmlDictionaryReader, DataContractSerializer, LinkedList
     was missing.



    Top 10 Contributor
    Posts 9,475

    The serialization related issues would occur if they actually have the Serializable and NonSerialized attributes in their implementation (something Silverlight doesn't have).

    DataAnnotations don't exist on all platforms (Xamarin for example) so CSLA actually includes its own implementation for those platforms. If these guys don't have it that shouldn't be an issue, as we can pull in our existing implementation.

    The other missing stuff looks like something that could be overcome either by having them implement the components, or by having CSLA implement them for this platform.


    Top 500 Contributor
    Posts 33
    wilfreds replied on Thu, Jun 11 2015 3:26 AM

    Thanks. Removing NonSerializedAttribute.cs and SerializationAttribute.cs, and adding the DataAnnotations folder helped a lot. If I close all files and do a rebuild it will tell me that I have 55 errors.

    Regular expressions is also next on the list that they plan to implement.


    Top 10 Contributor
    Posts 9,475

    I believe regex is used in just one rule in Csla.Rules, so you could eliminate that with a compiler directive.


    Page 1 of 1 (4 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems