Silverlight 3 Class Library

I am currently working on a user interface development project, and it was decided to implement it in Silvelight. I understand that Microsoft developers are trying to minimize the size of the distribution and why some (lots) of classes are not included in the regular .NET Framework. Are you expecting more classes in the Silverlight 3 library?

+3
source share
4 answers

I hope not, and I doubt it.

Scott Guthrie, who apparently runs the project for Microsoft, says he doesn’t want to put β€œnice” if there is no room for β€œfuture” in the future.

, - , .

+3

, Reflector .NET Framework, " " .

: http://www.red-gate.com/products/reflector/

, , HttpUtility.ParseQueryString:

public IDictionary<string, string> ParseParams(string paramsString)
{
    if (string.IsNullOrEmpty(paramsString))
        throw new ArgumentNullException("paramsString");

    // convert to dictionary
    var dict = new Dictionary<string, string>();

    // remove the leading ?
    if (paramsString.StartsWith("?"))
        paramsString = paramsString.Substring(1);

    var length = paramsString.Length;

    for (var i = 0; i < length; i++) {
        var startIndex = i;
        var pivotIndex = -1;

        while (i < length) {
            char ch = paramsString[i];
            if (ch == '=') {
                if (pivotIndex < 0) {
                    pivotIndex = i;
                }
            } else if (ch == '&') {
                break;
            }
            i++;
        }

        string name;
        string value;
        if (pivotIndex >= 0) {
            name = paramsString.Substring(startIndex, pivotIndex - startIndex);
            value = paramsString.Substring(pivotIndex + 1, (i - pivotIndex) - 1);
        } else {
            name = paramsString.Substring(startIndex, i - startIndex);
            value = null;
        }

        dict.Add(UrlDecode(name), UrlDecode(value));

        // if string ends with ampersand, add another empty token
        if ((i == (length - 1)) && (paramsString[i] == '&'))
            dict.Add(null, string.Empty);
    }

    return dict;
}

, , , , , .NET BCL... ? Silverlight.

IMO, , , , , " ", Silverlight, , - .

, querystring , , , , , .

+6

Silverlight 3, , . Silverlight 3 , , . , : , WCF, 3D, , ... , . , ​​ XAP .

+1
source

The .NET framework contains heaps of things that are little or not used in an isolated environment, such as Silverlight.

I would not expect to see much more of the standard .NET platform included in the Core CLR, however there will be many things in Silverlight3 from WPF.

0
source

Source: https://habr.com/ru/post/1703476/


All Articles