Giter Club home page Giter Club logo

westwindtoolkit's People

Contributors

druttka avatar jlvidal avatar mattslay avatar mertcanyalhi avatar osa avatar randruc avatar rickstrahl avatar rinkeb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

westwindtoolkit's Issues

Can not Create Controller instance by parameters outside of MVC

At the Westwind.Web.Mvc.ViewRender class has this method:

public static T CreateController<T>(RouteData routeData = null)
            where T : Controller, new()

The CreateController to create an MVC Controller instance.

But when the MVC Controller Methods have parameters and it is not parameter less then that have problem!

Thanks a lot for interested library.

Westwind.Utilities Fails to install in VS Community 2017 Web API app

I am running an app that is .NetCore with a Web API, nothing else. I used the suggested installation method. That and the results follow:

PM> Install-Package Westwind.Utilities
Restoring packages for C:\Users\Main\Documents\Visual Studio 2017\Projects\mycoreupload\mycoreupload\mycoreupload.csproj...
Install-Package : Package Westwind.Utilities 2.71.0 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package
Westwind.Utilities 2.71.0 supports:

  • net40 (.NETFramework,Version=v4.0)
  • net45 (.NETFramework,Version=v4.5)
    At line:1 char:1
  • Install-Package Westwind.Utilities
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : One or more packages are incompatible with .NETCoreApp,Version=v1.1.
At line:1 char:1

  • Install-Package Westwind.Utilities
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

Install-Package : Package restore failed. Rolling back package changes for 'mycoreupload'.
At line:1 char:1

  • Install-Package Westwind.Utilities
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
    
    

ReflectionUtils.SetPropertInternal tries to write to ReadOnly properties

Current Code: Line 547 in ReflectionUtils or thereabouts:

if (Member.MemberType == MemberTypes.Property)
((PropertyInfo)Member). pi.SetValue(Parent, Value, null);
else
((FieldInfo)Member).SetValue(Parent, Value);

perhaps a test: ((PropertyInfo)Member).CanWrite ?? before the SetValue

It's done that way in the StringSerializer

This issue also occurs in the "ConfigurationFileConfigurationProvider" when missingFields are set.

Regards

Rob v N
Brisbane, AUS

ww.jquery.js: Number.prototype.formatNumber incorrect for "n<digits>" format

Number.formatNumber does not work correctly when specifying a fixed-precision format (for example "n1") in locales not using a period as decimal separator.

See line 2052 in ww.jquery.js v1.26: Number.toFixed formats according to the neutral locale meaning that it uses a period for the decimal separator. Thus, if we want to split the integer and fractional parts in the resulting string we need to split with '.' rather than the current locale-dependent number format's separator.

ConfigurationFile provider does not respect configSource attribute

Hi Rick,

In web.config files it is possible to set an optional attribute configSource on a section. This enables the user to store the settings within that section in a separate file. We use this feature to separate customer-specific settings from the common root web config.

When configuring the the db resource provider of the Westwind.Globalization project, we try to follow this strategy as well. For example:
<DbResourceConfiguration configSource="Customer\dbResourceProvider.config" />

This goes well when reading. The settings are properly read from the file specified in the configSource attribute, probably via the built-in .net functionality.
However, the provider attempts to write them back to file when any are missing. But instead of writing them to the configSource file (where they came from), they are written as child nodes in the root config file. This breaks the configuration, because child nodes are not allowed for sections where a configSource is specified.

The problem seems to be the Write function at
https://github.com/RickStrahl/WestwindToolkit/blob/master/Westwind.Utilities/Configuration/Providers/ConfigurationFileConfigurationProvider.cs#L327 , which calls WriteConfigurationValue on the DOM of the root web config.

The workaround is to ensure all expected config settings are there so it doesn't have to write at all :-) but i guess being more compliant to the specs would make an improvement to the toolkit .

Guid not serialized correctly

Hello!

When using WestwindJsonSerializer to serialize something that contains a Guid (a data reader for example), the Guids are serialized as an object with length parameter instead of the guid's string.

For example:
"Guid": {Length: 36}
instead of: "Guid": "8631CF71-2948-466C-A103-5B3726341D63"

Fix suggestion:
In WestwindJsonSerializer.cs, around line 339:

else if (val is Guid)
WriteObject(sb, val.ToString());
else

replace WriteObject with WriteString

Thanks!

MVC ViewRenderer issue

I believe I've found a bug in the Westwind.Web.Mvc.ViewRenderer implementation.

In RenderViewToStringInternal (line 137), it checks to see if the viewEngineResult is null. At least with MVC4 in my testing, the viewEngineResult is always not null. If the view path was truly not found, the result is not null but the viewEngineResult.View property is null.

This ends up causing an ArgumentNullException on the ViewContext constructor call on line 148.

I'd suggest changing the conditional to:

if (viewEngineResult == null|| viewEngineResult.View == null)
    throw new FileNotFoundException...

Of course I might be wrong too ;)

SqlDataAccess.InsertEntity returns DbNull for identity key

Hi,

I'm trying out SqlDataAccess with SQL server 2012.

When I use InsertEntity (with returnIdentityKey = true), the method returns a System.DbNull value, although the insert statement is successful.

If I manually execute the LastSql from the SqlDataAccess instance, it works. I.e when I execute this:
INSERT INTO SomeTable(columnA, columnB) VALUES(valueA, valueB); select SCOPE_IDENTITY()

If I execute the same statement above with SqlDataAccess.ExecuteScalar() it also works.

However, I understand from the source code that InsertEntity() first executes the insert command using ExecuteNonQuery and then performs an ExecuteScalar("select SCOPE_IDENTITY()"). Isn't this a problem? From what I can see, ExecuteNonQuery always closes the connection (in a finally clause) so "select SCOPE_IDENTITY()" would run in a new connection.

Regards,
Hans

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.