mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-15 14:09:04 +08:00
Upgrading NH3
--HG-- branch : NH3
This commit is contained in:
parent
09e3d6d4c2
commit
9bed7cbaba
@ -1,12 +1,12 @@
|
||||
c47525e90819321d37962a11313006a4ccfc8362 src/Orchard.Web/Modules/Orchard.AntiSpam
|
||||
03306c0dad118c03c4ee21ce274a5f9c5855aec3 src/Orchard.Web/Modules/Orchard.Autoroute
|
||||
86eb54fecd30f01ee9157d77def9e1a1aef2d6c3 src/Orchard.Web/Modules/Orchard.Autoroute
|
||||
a8cd78f4730747bf592935aaa605874938a9c89f src/Orchard.Web/Modules/Orchard.ContentPermissions
|
||||
3957b9528d8499f9adcb0a606e12c5e5015ed035 src/Orchard.Web/Modules/Orchard.ContentPicker
|
||||
d466369118538a8ca77754d047ee841d016ea9c2 src/Orchard.Web/Modules/Orchard.ContentPicker
|
||||
3ad1bdc80b8374433d98469e8740bc48ef114be2 src/Orchard.Web/Modules/Orchard.CustomForms
|
||||
b639cb33d2ba038de6048350400b664399608996 src/Orchard.Web/Modules/Orchard.Forms
|
||||
b748de63e3cf8debfc3eba77f26089705147047d src/Orchard.Web/Modules/Orchard.Rules
|
||||
419399ef2e37122a000e6cc8674148d3183d7032 src/Orchard.Web/Modules/Orchard.TaskLease
|
||||
63dda71453ebbfd0e165662a0d56c9c0a7a3d3d4 src/Orchard.Web/Modules/Orchard.Tokens
|
||||
a47761330447df38f714bc17797b8895721a6974 src/orchard.web/Modules/Orchard.Alias
|
||||
a2ed939103036405c0d446d6562bd365752ca9d3 src/orchard.web/Modules/Orchard.Projections
|
||||
80ada5dcf8158f432ce99fc3c7e76f5137e73473 src/orchard.web/Modules/Orchard.Projections
|
||||
f649216f02ad6c2793a248a6386e94777eab4d59 src/orchard.web/modules/Orchard.Fields
|
||||
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
http://www.antlr.org/license.html
|
Binary file not shown.
@ -1,14 +0,0 @@
|
||||
Copyright 2004-2007 Castle Project - http://www.castleproject.org/
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,14 +0,0 @@
|
||||
Copyright 2004-2007 Castle Project - http://www.castleproject.org/
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,10 +0,0 @@
|
||||
Copyright (c) 2008-2009, James Gregory and contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of James Gregory nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
Binary file not shown.
@ -1,460 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
Binary file not shown.
@ -1,40 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>NHibernate.ByteCode.Castle</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:NHibernate.ByteCode.Castle.LazyInitializer">
|
||||
<summary>
|
||||
A <see cref="T:NHibernate.Proxy.ILazyInitializer"/> for use with the Castle Dynamic Class Generator.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.ByteCode.Castle.LazyInitializer.#ctor(System.String,System.Type,System.Object,System.Reflection.MethodInfo,System.Reflection.MethodInfo,NHibernate.Type.IAbstractComponentType,NHibernate.Engine.ISessionImplementor)">
|
||||
<summary>
|
||||
Initializes a new <see cref="T:NHibernate.ByteCode.Castle.LazyInitializer"/> object.
|
||||
</summary>
|
||||
<param name="entityName"></param>
|
||||
<param name="persistentClass">The Class to Proxy.</param>
|
||||
<param name="id">The Id of the Object we are Proxying.</param>
|
||||
<param name="getIdentifierMethod"></param>
|
||||
<param name="setIdentifierMethod"></param>
|
||||
<param name="componentIdType"></param>
|
||||
<param name="session">The ISession this Proxy is in.</param>
|
||||
</member>
|
||||
<member name="M:NHibernate.ByteCode.Castle.LazyInitializer.Intercept(Castle.Core.Interceptor.IInvocation)">
|
||||
<summary>
|
||||
Invoke the actual Property/Method using the Proxy or instantiate the actual
|
||||
object and use it when the Proxy can't handle the method.
|
||||
</summary>
|
||||
<param name="invocation">The <see cref="T:Castle.Core.Interceptor.IInvocation"/> from the generated Castle.DynamicProxy.</param>
|
||||
</member>
|
||||
<member name="M:NHibernate.ByteCode.Castle.ProxyFactory.GetProxy(System.Object,NHibernate.Engine.ISessionImplementor)">
|
||||
<summary>
|
||||
Build a proxy using the Castle.DynamicProxy library.
|
||||
</summary>
|
||||
<param name="id">The value for the Id.</param>
|
||||
<param name="session">The Session the proxy is in.</param>
|
||||
<returns>A fully built <c>INHibernateProxy</c>.</returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
Binary file not shown.
@ -1,460 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
@ -1,84 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Andre Rodrigues <andrerod@microsoft.com>
|
||||
# Date 1305755030 25200
|
||||
# Node ID 9cd8564ec960ed8b634f87249da62a69b506b60f
|
||||
# Parent 82d19d966b63b14bc6b7e1d76404c0fb0aacf4e0
|
||||
Exposing References method to avoid the usage of propertyinfo.
|
||||
|
||||
diff -r 82d19d966b63 -r 9cd8564ec960 src/FluentNHibernate/Mapping/ClasslikeMapBase.cs
|
||||
--- a/src/FluentNHibernate/Mapping/ClasslikeMapBase.cs Wed May 18 14:42:42 2011 -0700
|
||||
+++ b/src/FluentNHibernate/Mapping/ClasslikeMapBase.cs Wed May 18 14:43:50 2011 -0700
|
||||
@@ -64,7 +64,11 @@
|
||||
|
||||
protected virtual ManyToOnePart<TOther> References<TOther>(PropertyInfo property, string columnName)
|
||||
{
|
||||
- var part = new ManyToOnePart<TOther>(EntityType, property);
|
||||
+ return References<TOther>(property.DeclaringType, property.Name, columnName);
|
||||
+ }
|
||||
+
|
||||
+ public ManyToOnePart<TOther> References<TOther>(Type declaringType, string propertyName, string columnName) {
|
||||
+ var part = new ManyToOnePart<TOther>(EntityType, propertyName, declaringType.Name);
|
||||
|
||||
if (columnName != null)
|
||||
part.Column(columnName);
|
||||
diff -r 82d19d966b63 -r 9cd8564ec960 src/FluentNHibernate/Mapping/CompositeElementPart.cs
|
||||
--- a/src/FluentNHibernate/Mapping/CompositeElementPart.cs Wed May 18 14:42:42 2011 -0700
|
||||
+++ b/src/FluentNHibernate/Mapping/CompositeElementPart.cs Wed May 18 14:43:50 2011 -0700
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
protected virtual ManyToOnePart<TOther> References<TOther>(PropertyInfo property, string columnName)
|
||||
{
|
||||
- var part = new ManyToOnePart<TOther>(typeof(T), property);
|
||||
+ var part = new ManyToOnePart<TOther>(typeof(T), property.Name, property.DeclaringType.Name);
|
||||
|
||||
if (columnName != null)
|
||||
part.Column(columnName);
|
||||
diff -r 82d19d966b63 -r 9cd8564ec960 src/FluentNHibernate/Mapping/ManyToOnePart.cs
|
||||
--- a/src/FluentNHibernate/Mapping/ManyToOnePart.cs Wed May 18 14:42:42 2011 -0700
|
||||
+++ b/src/FluentNHibernate/Mapping/ManyToOnePart.cs Wed May 18 14:43:50 2011 -0700
|
||||
@@ -20,12 +20,14 @@
|
||||
private readonly AttributeStore<ManyToOneMapping> attributes = new AttributeStore<ManyToOneMapping>();
|
||||
private readonly AttributeStore<ColumnMapping> columnAttributes = new AttributeStore<ColumnMapping>();
|
||||
private readonly Type entity;
|
||||
- private readonly PropertyInfo property;
|
||||
+ private readonly string name;
|
||||
+ private readonly string declaringTypeName;
|
||||
|
||||
- public ManyToOnePart(Type entity, PropertyInfo property)
|
||||
+ public ManyToOnePart(Type entity, string name, string declaringTypeName)
|
||||
{
|
||||
this.entity = entity;
|
||||
- this.property = property;
|
||||
+ this.name = name;
|
||||
+ this.declaringTypeName = declaringTypeName;
|
||||
access = new AccessStrategyBuilder<ManyToOnePart<TOther>>(this, value => attributes.Set(x => x.Access, value));
|
||||
fetch = new FetchTypeExpression<ManyToOnePart<TOther>>(this, value => attributes.Set(x => x.Fetch, value));
|
||||
cascade = new CascadeExpression<ManyToOnePart<TOther>>(this, value => attributes.Set(x => x.Cascade, value));
|
||||
@@ -37,16 +39,15 @@
|
||||
var mapping = new ManyToOneMapping(attributes.CloneInner());
|
||||
|
||||
mapping.ContainingEntityType = entity;
|
||||
- mapping.PropertyInfo = property;
|
||||
|
||||
if (!mapping.IsSpecified("Name"))
|
||||
- mapping.Name = property.Name;
|
||||
+ mapping.Name = name;
|
||||
|
||||
if (!mapping.IsSpecified("Class"))
|
||||
mapping.SetDefaultValue(x => x.Class, new TypeReference(typeof(TOther)));
|
||||
|
||||
if (columns.Count == 0)
|
||||
- mapping.AddDefaultColumn(CreateColumn(property.Name + "_id"));
|
||||
+ mapping.AddDefaultColumn(CreateColumn(name + "_id"));
|
||||
|
||||
foreach (var column in columns)
|
||||
{
|
||||
@@ -124,7 +125,7 @@
|
||||
|
||||
public ManyToOnePart<TOther> ForeignKey()
|
||||
{
|
||||
- return ForeignKey(string.Format("FK_{0}To{1}", property.DeclaringType.Name, property.Name));
|
||||
+ return ForeignKey(string.Format("FK_{0}To{1}", declaringTypeName, name));
|
||||
}
|
||||
|
||||
public ManyToOnePart<TOther> ForeignKey(string foreignKeyName)
|
@ -1,21 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Andre Rodrigues <andrerod@microsoft.com>
|
||||
# Date 1305755041 25200
|
||||
# Node ID 48d2b0560a4196a96e906a218208b69ff9db25bd
|
||||
# Parent 9cd8564ec960ed8b634f87249da62a69b506b60f
|
||||
Making GenericEnumMapper Serializable.
|
||||
|
||||
diff -r 9cd8564ec960 -r 48d2b0560a41 src/FluentNHibernate/Mapping/GenericEnumMapper.cs
|
||||
--- a/src/FluentNHibernate/Mapping/GenericEnumMapper.cs Wed May 18 14:43:50 2011 -0700
|
||||
+++ b/src/FluentNHibernate/Mapping/GenericEnumMapper.cs Wed May 18 14:44:01 2011 -0700
|
||||
@@ -1,7 +1,9 @@
|
||||
-using NHibernate.Type;
|
||||
+using System;
|
||||
+using NHibernate.Type;
|
||||
|
||||
namespace FluentNHibernate.Mapping
|
||||
{
|
||||
+ [Serializable]
|
||||
public class GenericEnumMapper<TEnum> : EnumStringType
|
||||
{
|
||||
public GenericEnumMapper()
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
http://logging.apache.org/log4net/license.html
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +0,0 @@
|
||||
|
||||
== nhibernate ==
|
||||
|
||||
https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/branches/2.1.x/nhibernate
|
||||
at revision #4966
|
||||
applied perf-embedded-serializer-and-compiled-schema-reuse.patch
|
||||
nant -t:net-3.5 -D:project.config=release
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,731 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>NHibernate.Linq</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:NHibernate.Linq.Expressions.NHibernateExpressionType">
|
||||
<summary>
|
||||
Extended node types for custom expressions
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Expressions.SqlFunctionAttribute">
|
||||
<summary>
|
||||
Associates a method with a corresponding SQL function.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Expressions.SqlFunctionAttribute.#ctor">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:NHibernate.Linq.Expressions.SqlFunctionAttribute"/> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Expressions.SqlFunctionAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:NHibernate.Linq.Expressions.SqlFunctionAttribute"/> class.
|
||||
</summary>
|
||||
<param name="owner">The name of the schema that owns the SQL function.</param>
|
||||
</member>
|
||||
<member name="P:NHibernate.Linq.Expressions.SqlFunctionAttribute.Owner">
|
||||
<summary>
|
||||
Gets or sets the name of the schema that owns the SQL function.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NHibernate.Linq.Expressions.SqlFunctionAttribute.PropertyPosition">
|
||||
<summary>
|
||||
Gets or sets the position of the function parameter that accepts the property name.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.SqlClient.SqlClientExtensions">
|
||||
<summary>
|
||||
Provides static methods that represent functionality provided by MS SQL Server.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Day(NHibernate.Linq.IDbMethods,System.DateTime)">
|
||||
<summary>
|
||||
Returns an integer representing the day datepart of the specified date.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Day(NHibernate.Linq.IDbMethods,System.Nullable{System.DateTime})">
|
||||
<summary>
|
||||
Returns an integer representing the day datepart of the specified date.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Month(NHibernate.Linq.IDbMethods,System.DateTime)">
|
||||
<summary>
|
||||
Returns an integer that represents the month part of a specified date.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Month(NHibernate.Linq.IDbMethods,System.Nullable{System.DateTime})">
|
||||
<summary>
|
||||
Returns an integer that represents the month part of a specified date.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Year(NHibernate.Linq.IDbMethods,System.DateTime)">
|
||||
<summary>
|
||||
Returns an integer that represents the year part of a specified date.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Year(NHibernate.Linq.IDbMethods,System.Nullable{System.DateTime})">
|
||||
<summary>
|
||||
Returns an integer that represents the year part of a specified date.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Ascii(NHibernate.Linq.IDbMethods,System.String)">
|
||||
<summary>
|
||||
Returns the ASCII code value of the leftmost character of a character expression.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Ascii(NHibernate.Linq.IDbMethods,System.Char)">
|
||||
<summary>
|
||||
Returns the ASCII code value of the leftmost character of a character expression.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Ascii(NHibernate.Linq.IDbMethods,System.Nullable{System.Char})">
|
||||
<summary>
|
||||
Returns the ASCII code value of the leftmost character of a character expression.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Char(NHibernate.Linq.IDbMethods,System.Int32)">
|
||||
<summary>
|
||||
Converts an int ASCII code to a character.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Char(NHibernate.Linq.IDbMethods,System.Nullable{System.Int32})">
|
||||
<summary>
|
||||
Converts an int ASCII code to a character.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.CharIndex(NHibernate.Linq.IDbMethods,System.String,System.Char)">
|
||||
<summary>
|
||||
Returns the starting position of the specified expression in a character string.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<param name="search"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.CharIndex(NHibernate.Linq.IDbMethods,System.String,System.Char,System.Int32)">
|
||||
<summary>
|
||||
Returns the starting position of the specified expression in a character string.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<param name="search"></param>
|
||||
<param name="start"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.CharIndex(NHibernate.Linq.IDbMethods,System.String,System.String)">
|
||||
<summary>
|
||||
Returns the starting position of the specified expression in a character string.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<param name="search"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.CharIndex(NHibernate.Linq.IDbMethods,System.String,System.String,System.Int32)">
|
||||
<summary>
|
||||
Returns the starting position of the specified expression in a character string.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<param name="search"></param>
|
||||
<param name="start"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Left(NHibernate.Linq.IDbMethods,System.String,System.Int32)">
|
||||
<summary>
|
||||
Returns the left part of a character string with the specified number of characters.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<param name="length"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Len(NHibernate.Linq.IDbMethods,System.String)">
|
||||
<summary>
|
||||
Returns the number of characters of the specified string expression, excluding trailing blanks.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Lower(NHibernate.Linq.IDbMethods,System.String)">
|
||||
<summary>
|
||||
Returns a character expression after converting uppercase character data to lowercase.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.LTrim(NHibernate.Linq.IDbMethods,System.String)">
|
||||
<summary>
|
||||
Returns a character expression after it removes leading blanks.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Replace(NHibernate.Linq.IDbMethods,System.String,System.String,System.String)">
|
||||
<summary>
|
||||
Replaces all occurrences of a specified string value with another string value.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<param name="search"></param>
|
||||
<param name="replace"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Replicate(NHibernate.Linq.IDbMethods,System.String,System.Int32)">
|
||||
<summary>
|
||||
Repeats a string value a specified number of times.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<param name="count"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Reverse(NHibernate.Linq.IDbMethods,System.String)">
|
||||
<summary>
|
||||
Returns the reverse of a character expression.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Right(NHibernate.Linq.IDbMethods,System.String,System.Int32)">
|
||||
<summary>
|
||||
Returns the right part of a character string with the specified number of characters.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<param name="length"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.RTrim(NHibernate.Linq.IDbMethods,System.String)">
|
||||
<summary>
|
||||
Returns a character string after truncating all trailing blanks.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Substring(NHibernate.Linq.IDbMethods,System.String,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Returns part of a character, binary, text, or image expression.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<param name="start"></param>
|
||||
<param name="length"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.SqlClient.SqlClientExtensions.Upper(NHibernate.Linq.IDbMethods,System.String)">
|
||||
<summary>
|
||||
Returns a character expression with lowercase character data converted to uppercase.
|
||||
</summary>
|
||||
<param name="methods"></param>
|
||||
<param name="value"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Transform.LinqGroupingResultTransformer">
|
||||
<summary>
|
||||
Transforms critieria query results into a collection of grouped objects.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Transform.LinqGroupingResultTransformer.#ctor(System.Type,System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:NHibernate.Linq.LinqGroupingResultTransformer"/> class.
|
||||
</summary>
|
||||
<param name="type">A <see cref="T:System.Type"/> representing the type of collection to transform.</param>
|
||||
<param name="propertyName">The name of the property to be used as a key for the purpose of grouping.</param>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Transform.LinqGroupingResultTransformer.TransformList(System.Collections.IList)">
|
||||
<summary>
|
||||
Transforms the query result collection.
|
||||
</summary>
|
||||
<param name="collection">An <see cref="T:System.Collections.IList"/> of objects.</param>
|
||||
<returns>A transformed <see cref="T:System.Collections.IList"/> object.</returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Transform.LinqGroupingResultTransformer.TransformTuple(System.Object[],System.String[])">
|
||||
<summary>
|
||||
Transforms each query result.
|
||||
</summary>
|
||||
<param name="tuple">An <see cref="T:System.Object"/> array of query result values.</param>
|
||||
<param name="aliases">A <see cref="T:System.String"/> array of column aliases.</param>
|
||||
<returns>An <see cref="T:System.Object"/> initialized with the values from the specified tuple.</returns>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Transform.IGrouping">
|
||||
<summary>
|
||||
Provides a method for adding individual objects to a collection of grouped objects.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Transform.IGrouping.Add(System.Object)">
|
||||
<summary>
|
||||
Adds an object to the current group.
|
||||
</summary>
|
||||
<param name="item">The <see cref="T:System.Object"/> to add.</param>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Transform.Grouping`2">
|
||||
<summary>
|
||||
Represents a collection of objects that have a common key.
|
||||
</summary>
|
||||
<typeparam name="TKey"></typeparam>
|
||||
<typeparam name="TElement"></typeparam>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Transform.Grouping`2.#ctor(`0)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:NHibernate.Linq.Grouping"/> class.
|
||||
</summary>
|
||||
<param name="key"></param>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Transform.Grouping`2.Add(System.Object)">
|
||||
<summary>
|
||||
Adds an object to the current group.
|
||||
</summary>
|
||||
<param name="item">The <see cref="T:System.Object"/> to add.</param>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Transform.Grouping`2.GetEnumerator">
|
||||
<summary>
|
||||
Returns an enumerator that iterates through the collection.
|
||||
</summary>
|
||||
<returns>An <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to iterate through the collection.</returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Transform.Grouping`2.System#Collections#IEnumerable#GetEnumerator">
|
||||
<summary>
|
||||
Returns an enumerator that iterates through the collection.
|
||||
</summary>
|
||||
<returns>An <see cref="T:System.Collections.IEnumerator"/> that can be used to iterate through the collection.</returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Transform.Grouping`2.ToString">
|
||||
<summary>
|
||||
Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
|
||||
</summary>
|
||||
<returns>A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.</returns>
|
||||
</member>
|
||||
<member name="P:NHibernate.Linq.Transform.Grouping`2.Key">
|
||||
<summary>
|
||||
Gets the key of the <see cref="T:System.Linq.IGrouping`2"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Transform.TypeSafeConstructorMemberInitResultTransformer.SetValue(System.Reflection.MemberInfo,System.Object,System.Object)">
|
||||
<summary>
|
||||
Sets the value of the field or property represented by the specified
|
||||
<see cref="T:System.Reflection.MemberInfo"/> for the supplied object instance.
|
||||
</summary>
|
||||
<param name="memberInfo">A <see cref="T:System.Reflection.MemberInfo"/> object.</param>
|
||||
<param name="instance">An instance of an object.</param>
|
||||
<param name="valueToSet">The value to set on the specified object.</param>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Util.LinqUtil">
|
||||
<summary>
|
||||
Provides static utility methods that aid in evaluating expression trees.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Util.LinqUtil.Iterate``1(System.Func{``0,``0},``0)">
|
||||
<summary>
|
||||
Creates a collection of type T by invoking a delegate method during
|
||||
enumeration that return each item, begining with an initialValue.
|
||||
</summary>
|
||||
<typeparam name="T">The type of collection being created.</typeparam>
|
||||
<param name="func">A delegate method to invoke.</param>
|
||||
<param name="initialValue">The first item in the collection.</param>
|
||||
<returns>An <see cref="T:System.Collections.Generic.IEnumerable`1"/> collection of type T.</returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Util.LinqUtil.ChangeType(System.Object,System.Type)">
|
||||
<summary>
|
||||
Returns an <see cref="T:System.Object"/> with the specified <see cref="T:System.Type"/>
|
||||
and whose value is equivalent to the specified object.
|
||||
</summary>
|
||||
<param name="value">An <see cref="T:System.Object"/> that implements the <see cref="T:System.IConvertible"/> interface.</param>
|
||||
<param name="conversionType">A <see cref="T:System.Type"/>.</param>
|
||||
<returns>An object whose <see cref="T:System.Type"/> is conversionType and whose value is equivalent
|
||||
to value, or null, if value is null and conversionType is not a value type.</returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Util.LinqUtil.IsNullableType(System.Type)">
|
||||
<summary>
|
||||
Determines if the specified type is a <see cref="T:System.Nullable`1"/> type.
|
||||
</summary>
|
||||
<param name="type">A <see cref="T:System.Type"/> to check.</param>
|
||||
<returns>True if the type is a <see cref="T:System.Nullable`1"/> type, otherwise false.</returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Util.LinqUtil.IsAnonymousType(System.Type)">
|
||||
<summary>
|
||||
Determines if the specified type is an anonymous type.
|
||||
</summary>
|
||||
<param name="type">A <see cref="T:System.Type"/> to check.</param>
|
||||
<returns>True if the type is an anonymous type, otherwise false.</returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.Util.LinqUtil.SqlEncode(System.Object)">
|
||||
<summary>
|
||||
Encodes an <see cref="T:System.Object"/> for use in SQL statements.
|
||||
</summary>
|
||||
<param name="value">The value to encode.</param>
|
||||
<returns>A SQL encoded value.</returns>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Util.TypeSystem">
|
||||
<remarks>
|
||||
http://blogs.msdn.com/mattwar/archive/2007/07/30/linq-building-an-iqueryable-provider-part-i.aspx
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.AssociationVisitor">
|
||||
<summary>
|
||||
Preprocesses an expression tree replacing MemberAccessExpressions and ParameterExpressions with
|
||||
NHibernate-specific PropertyAccessExpressions and EntityExpressions respectively.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.ExpressionVisitor">
|
||||
<summary>
|
||||
Provides virtual methods that can be used by subclasses to parse an expression tree.
|
||||
</summary>
|
||||
<remarks>
|
||||
This class actually already exists in the System.Core assembly...as an internal class.
|
||||
I can only speculate as to why it is internal, but it is obviously much too dangerous
|
||||
for anyone outside of Microsoft to be using...
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.BinaryBooleanReducer">
|
||||
<summary>
|
||||
Preprocesses an expression tree replacing binary boolean expressions with unary expressions.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.ComparePropToProp">
|
||||
<summary>
|
||||
Represents a method that returns an <see cref="T:NHibernate.Criterion.ICriterion"/>
|
||||
object that compares one property to another property using a binary expression.
|
||||
</summary>
|
||||
<param name="propertyName">The name of the property to compare on the left hand side of the expression.</param>
|
||||
<param name="otherPropertyName">The name of the property to compare on the right hand side of the expression.</param>
|
||||
<returns>An initialized <see cref="T:NHibernate.Criterion.ICriterion"/> object.</returns>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.ComparePropToValue">
|
||||
<summary>
|
||||
Represents a method that returns an <see cref="T:NHibernate.Criterion.ICriterion"/>
|
||||
object that compares a property to a constant value using a binary expression.
|
||||
</summary>
|
||||
<param name="propertyName">The name of the property to compare on the left hand side of the expression.</param>
|
||||
<param name="value">The constant value used for the right hand side of the expression.</param>
|
||||
<returns>An initialized <see cref="T:NHibernate.Criterion.ICriterion"/> object.</returns>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.CompareValueToCriteria">
|
||||
<summary>
|
||||
Represents a method that returns an <see cref="T:NHibernate.Criterion.ICriterion"/>
|
||||
object that compares a value to a criteria using a binary expression.
|
||||
</summary>
|
||||
<param name="value">The value on the left hand side of the expression.</param>
|
||||
<param name="criteria">The <see cref="T:NHibernate.Criterion.DetachedCriteria"/> used for the right hand side of the expression.</param>
|
||||
<returns>An initialized <see cref="T:NHibernate.Criterion.ICriterion"/> object.</returns>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.ComparePropToCriteria">
|
||||
<summary>
|
||||
Represents a method that returns an <see cref="T:NHibernate.Criterion.ICriterion"/>
|
||||
object that compares a property to a criteria using a binary expression.
|
||||
</summary>
|
||||
<param name="propertyName">The name of the property to compare on the left hand side of the expression.</param>
|
||||
<param name="criteria">The <see cref="T:NHibernate.Criterion.DetachedCriteria"/> used for the right hand side of the expression.</param>
|
||||
<returns>An initialized <see cref="T:NHibernate.Criterion.ICriterion"/> object.</returns>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.BinaryCriterionVisitor">
|
||||
<summary>
|
||||
Visits a BinaryExpression providing the appropriate NHibernate ICriterion.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.NHibernateExpressionVisitor">
|
||||
<summary>
|
||||
NHibernate-specific base expression visitor.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.BinaryExpressionOrderer">
|
||||
<summary>
|
||||
Preprocesses an expression tree ordering binary expressions in accordance with the <see cref="T:NHibernate.Linq.Visitors.BinaryCriterionVisitor"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.CollectionAliasVisitor">
|
||||
<summary>
|
||||
Assigns the appropriate aliases to a collection access.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.EntityExpressionVisitor">
|
||||
<summary>
|
||||
Retrieves the first (or root) instance of EntityExpression found in the given Expression.
|
||||
</summary>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "M:NHibernate.Linq.Visitors.Evaluator.PartialEval(System.Linq.Expressions.Expression,System.Func{System.Linq.Expressions.Expression,System.Boolean})" -->
|
||||
<!-- Badly formed XML comment ignored for member "M:NHibernate.Linq.Visitors.Evaluator.PartialEval(System.Linq.Expressions.Expression)" -->
|
||||
<!-- Badly formed XML comment ignored for member "T:NHibernate.Linq.Visitors.Evaluator.SubtreeEvaluator" -->
|
||||
<member name="T:NHibernate.Linq.Visitors.Evaluator.Condensor">
|
||||
<summary>
|
||||
Brings certain basic expression patterns closer to the surface to
|
||||
avoid a lambda compile and dynamic invoke in simple cases
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.Evaluator.Nominator">
|
||||
<summary>
|
||||
Performs bottom-up analysis to determine which nodes can possibly
|
||||
be part of an evaluated sub-tree.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.GroupingArgumentsVisitor">
|
||||
<summary>
|
||||
Visits an expression tree providing the appropriate projections for grouping arguments.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.ImmediateResultsVisitor`1">
|
||||
<summary>
|
||||
Visits any expression calls that require immediate results.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.MemberNameVisitor">
|
||||
<summary>
|
||||
Visits an expression providing the member name being accessed based on the EntityExpressions and
|
||||
PropertyAccessExpressions in the expression tree. Any entity associations encountered are added
|
||||
as subcriteria to the query.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.NHibernateQueryTranslator">
|
||||
<summary>
|
||||
Translates a Linq Expression into an NHibernate ICriteria object.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.PropertyToMethodVisitor">
|
||||
<summary>
|
||||
Converts calls to an IEnumerable.Count property to IEnumerable.Count() extension method.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.RootVisitor">
|
||||
<summary>
|
||||
Translates a Linq Expression into an NHibernate ICriteria object.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.SelectArgumentsVisitor">
|
||||
<summary>
|
||||
Provides the appropriate NHibernate selection projections and/or IResultTransformers
|
||||
based on a given expression tree.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.SelectManyVisitor">
|
||||
<summary>
|
||||
Adds the appropriate subcriteria to the query based on a SelectMany expression tree.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Visitors.WhereArgumentsVisitor">
|
||||
<summary>
|
||||
Provides ICriterion for a query given a Linq expression tree.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NHibernate.Linq.Visitors.WhereArgumentsVisitor.CurrentCriterions">
|
||||
<summary>
|
||||
Gets the current collection of <see cref="T:NHibernate.Criterion.ICriterion"/> objects.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.CriteriaResultReader`1">
|
||||
<summary>
|
||||
Wraps an ICriteria object providing results when necessary.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.IDbMethods">
|
||||
<summary>
|
||||
Marker interface used to conditionally include database provider specific methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.NHibernateContext">
|
||||
<summary>
|
||||
Wraps an <see cref="T:NHibernate.ISession"/> object to provide base functionality
|
||||
for custom, database-specific context classes.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:NHibernate.Linq.NHibernateContext.Methods">
|
||||
<summary>
|
||||
Provides access to database provider specific methods.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.#ctor">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:NHibernate.Linq.NHibernateContext"/> class.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.#ctor(NHibernate.ISession)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:NHibernate.Linq.NHibernateContext"/> class.
|
||||
</summary>
|
||||
<param name="session">An initialized <see cref="T:NHibernate.ISession"/> object.</param>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.ProvideSession">
|
||||
<summary>
|
||||
Allows for empty construction but provides an interface for an interface to have the derived
|
||||
classes provide a session object late in the cycle.
|
||||
</summary>
|
||||
<returns>The Required <see cref="T:NHibernate.ISession"/> object.</returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.Clone">
|
||||
<summary>
|
||||
Creates a new object that is a copy of the current instance.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.Dispose">
|
||||
<summary>
|
||||
Disposes the wrapped <see cref="T:NHibernate.ISession"/> object.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.System#Data#Services#IUpdatable#AddReferenceToCollection(System.Object,System.String,System.Object)">
|
||||
<summary>
|
||||
Adds the reference to collection.
|
||||
</summary>
|
||||
<param name="targetResource">The target resource.</param>
|
||||
<param name="propertyName">Name of the property.</param>
|
||||
<param name="resourceToBeAdded">The resource to be added.</param>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.System#Data#Services#IUpdatable#ClearChanges">
|
||||
<summary>
|
||||
Clears the changes.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.System#Data#Services#IUpdatable#CreateResource(System.String,System.String)">
|
||||
<summary>
|
||||
Creates the resource.
|
||||
</summary>
|
||||
<param name="containerName">Name of the container.</param>
|
||||
<param name="fullTypeName">Full name of the type.</param>
|
||||
<returns>Newly created Resource</returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.System#Data#Services#IUpdatable#DeleteResource(System.Object)">
|
||||
<summary>
|
||||
Deletes the resource.
|
||||
</summary>
|
||||
<param name="targetResource">The target resource.</param>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.System#Data#Services#IUpdatable#GetResource(System.Linq.IQueryable,System.String)">
|
||||
<summary>
|
||||
Gets the resource.
|
||||
</summary>
|
||||
<param name="query">The query.</param>
|
||||
<param name="fullTypeName">Full name of the type.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.System#Data#Services#IUpdatable#GetValue(System.Object,System.String)">
|
||||
<summary>
|
||||
Gets the value.
|
||||
</summary>
|
||||
<param name="targetResource">The target resource.</param>
|
||||
<param name="propertyName">Name of the property.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.System#Data#Services#IUpdatable#RemoveReferenceFromCollection(System.Object,System.String,System.Object)">
|
||||
<summary>
|
||||
Removes the reference from collection.
|
||||
</summary>
|
||||
<param name="targetResource">The target resource.</param>
|
||||
<param name="propertyName">Name of the property.</param>
|
||||
<param name="resourceToBeRemoved">The resource to be removed.</param>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.System#Data#Services#IUpdatable#ResetResource(System.Object)">
|
||||
<summary>
|
||||
Replaces the resource.
|
||||
</summary>
|
||||
<param name="resource">The resource to reset.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.System#Data#Services#IUpdatable#ResolveResource(System.Object)">
|
||||
<summary>
|
||||
Resolves the resource.
|
||||
</summary>
|
||||
<param name="resource">The resource.</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.System#Data#Services#IUpdatable#SaveChanges">
|
||||
<summary>
|
||||
Saves the changes.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.System#Data#Services#IUpdatable#SetReference(System.Object,System.String,System.Object)">
|
||||
<summary>
|
||||
Sets the reference.
|
||||
</summary>
|
||||
<param name="targetResource">The target resource.</param>
|
||||
<param name="propertyName">Name of the property.</param>
|
||||
<param name="propertyValue">The property value.</param>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateContext.System#Data#Services#IUpdatable#SetValue(System.Object,System.String,System.Object)">
|
||||
<summary>
|
||||
Sets the value.
|
||||
</summary>
|
||||
<param name="targetResource">The target resource.</param>
|
||||
<param name="propertyName">Name of the property.</param>
|
||||
<param name="propertyValue">The property value.</param>
|
||||
</member>
|
||||
<member name="P:NHibernate.Linq.NHibernateContext.Session">
|
||||
<summary>
|
||||
Gets a reference to the <see cref="T:NHibernate.ISession"/> associated with this object.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NHibernate.Linq.NHibernateContext.UpdateCache">
|
||||
<summary>
|
||||
Gets the update cache.
|
||||
</summary>
|
||||
<value>The update cache.</value>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.NHibernateExtensions">
|
||||
<summary>
|
||||
Provides a static method that enables LINQ syntax for NHibernate Criteria Queries.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NHibernate.Linq.NHibernateExtensions.Linq``1(NHibernate.ISession)">
|
||||
<summary>
|
||||
Creates a new <see cref="T:NHibernate.Linq.NHibernateQueryProvider"/> object used to evaluate an expression tree.
|
||||
</summary>
|
||||
<typeparam name="T">An NHibernate entity type.</typeparam>
|
||||
<param name="session">An initialized <see cref="T:NHibernate.ISession"/> object.</param>
|
||||
<returns>An <see cref="T:NHibernate.Linq.NHibernateQueryProvider"/> used to evaluate an expression tree.</returns>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.QueryProvider">
|
||||
<summary>
|
||||
Generic IQueryProvider base class. See http://blogs.msdn.com/mattwar/archive/2007/07/30/linq-building-an-iqueryable-provider-part-i.aspx
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.Query`1">
|
||||
<summary>
|
||||
Generic IQueryable base class. See http://blogs.msdn.com/mattwar/archive/2007/07/30/linq-building-an-iqueryable-provider-part-i.aspx
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NHibernate.Linq.QueryOptions">
|
||||
<summary>
|
||||
It provides methods for caching the results, and some extension methods for them.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
@ -1,156 +0,0 @@
|
||||
Index: src/NHibernate.Linq/src/NHibernate.Linq/Visitors/Evaluator.cs
|
||||
===================================================================
|
||||
--- src/NHibernate.Linq/src/NHibernate.Linq/Visitors/Evaluator.cs (revision 1432)
|
||||
+++ src/NHibernate.Linq/src/NHibernate.Linq/Visitors/Evaluator.cs (working copy)
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
+using System.Reflection;
|
||||
|
||||
namespace NHibernate.Linq.Visitors
|
||||
{
|
||||
@@ -76,12 +77,143 @@
|
||||
if (e.NodeType == ExpressionType.Lambda)
|
||||
return e;
|
||||
|
||||
+ Expression condensed = new Condensor().Visit(e);
|
||||
+ if (condensed.NodeType == ExpressionType.Constant)
|
||||
+ return condensed;
|
||||
+
|
||||
LambdaExpression lambda = Expression.Lambda(e);
|
||||
Delegate fn = lambda.Compile();
|
||||
return Expression.Constant(fn.DynamicInvoke(null), e.Type);
|
||||
}
|
||||
}
|
||||
|
||||
+ /// <summary>
|
||||
+ /// Brings certain basic expression patterns closer to the surface to
|
||||
+ /// avoid a lambda compile and dynamic invoke in simple cases
|
||||
+ /// </summary>
|
||||
+ class Condensor : ExpressionVisitor
|
||||
+ {
|
||||
+ protected override Expression VisitMemberAccess(MemberExpression m)
|
||||
+ {
|
||||
+ Expression exp = Visit(m.Expression);
|
||||
+
|
||||
+ object constant;
|
||||
+ if (m.NodeType== ExpressionType.MemberAccess && TryGetConstant(exp, out constant))
|
||||
+ {
|
||||
+ if (m.Member.MemberType == MemberTypes.Field)
|
||||
+ {
|
||||
+ FieldInfo field = (FieldInfo) m.Member;
|
||||
+ object value = field.GetValue(constant);
|
||||
+ return Expression.Constant(value, m.Type);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (exp != m.Expression)
|
||||
+ {
|
||||
+ return Expression.MakeMemberAccess(exp, m.Member);
|
||||
+ }
|
||||
+ return m;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ protected override Expression VisitUnary(UnaryExpression u) {
|
||||
+ Expression operand = Visit(u.Operand);
|
||||
+
|
||||
+ object constant;
|
||||
+ if (u.NodeType== ExpressionType.Convert && TryGetConstant(operand, out constant))
|
||||
+ {
|
||||
+ if (u.Method == null)
|
||||
+ {
|
||||
+ Func<object, object> converter = BindConverter(operand.Type, u.Type);
|
||||
+ object value = converter(constant);
|
||||
+ return Expression.Constant(value, u.Type);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (operand != u.Operand) {
|
||||
+ return Expression.MakeUnary(u.NodeType, operand, u.Type, u.Method);
|
||||
+ }
|
||||
+ return u;
|
||||
+ }
|
||||
+
|
||||
+ private static bool TryGetConstant(Expression expression, out object constant) {
|
||||
+ if (expression == null) {
|
||||
+ constant = null;
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ if (expression.NodeType == ExpressionType.Constant) {
|
||||
+ constant = ((ConstantExpression)expression).Value;
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ if (expression.NodeType == ExpressionType.New) {
|
||||
+ NewExpression nex = (NewExpression)expression;
|
||||
+ object[] constants;
|
||||
+ if (nex.Members == null && TryGetConstants(nex.Arguments, out constants)) {
|
||||
+ constant = nex.Constructor.Invoke(constants);
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ constant = null;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ private static bool TryGetConstants(IList<Expression> expressions, out object[] constants) {
|
||||
+ if (expressions == null) {
|
||||
+ constants = null;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ object[] results = new object[expressions.Count];
|
||||
+ for (int index = 0; index != expressions.Count; ++index) {
|
||||
+ if (!TryGetConstant(expressions[index], out results[index])) {
|
||||
+ constants = null;
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ constants = results;
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ private static readonly IDictionary<System.Type, IDictionary<System.Type, Func<object, object>>> _converterGroups = new Dictionary<System.Type, IDictionary<System.Type, Func<object, object>>>();
|
||||
+
|
||||
+ private static Func<object,object> BindConverter(System.Type inType, System.Type outType)
|
||||
+ {
|
||||
+ IDictionary<System.Type, Func<object, object>> converterGroup;
|
||||
+ lock(_converterGroups)
|
||||
+ {
|
||||
+ if (!_converterGroups.TryGetValue(inType, out converterGroup))
|
||||
+ {
|
||||
+ converterGroup = new Dictionary<System.Type, Func<object, object>>();
|
||||
+ _converterGroups[inType] = converterGroup;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ Func<object, object> converter;
|
||||
+ lock (converterGroup)
|
||||
+ {
|
||||
+ if (!converterGroup.TryGetValue(outType, out converter))
|
||||
+ {
|
||||
+ var arg0 = Expression.Parameter(typeof(object), "arg0");
|
||||
+ var lambda = Expression.Lambda<Func<object, object>>(
|
||||
+ Expression.ConvertChecked(
|
||||
+ Expression.Convert(
|
||||
+ Expression.ConvertChecked(arg0, inType),
|
||||
+ outType),
|
||||
+ typeof(object)),
|
||||
+ arg0);
|
||||
+ converter = lambda.Compile();
|
||||
+ converterGroup[outType] = converter;
|
||||
+ }
|
||||
+ }
|
||||
+ return converter;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/// <summary>
|
||||
/// Performs bottom-up analysis to determine which nodes can possibly
|
||||
/// be part of an evaluated sub-tree.
|
@ -1,460 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
@ -1,5 +0,0 @@
|
||||
|
||||
https://nhcontrib.svn.sourceforge.net/svnroot/nhcontrib/trunk/src/NHibernate.Linq
|
||||
at revision #1432
|
||||
applied condensing-constant-expressions.patch
|
||||
nant -D:project.config=release
|
@ -1,28 +0,0 @@
|
||||
|
||||
Release Notes - NHibernate.Linq - Version 1.0.0
|
||||
|
||||
|
||||
** Bug
|
||||
* [NHLQ-5] - Query Issues with Entites on Components and Grand Children Entities
|
||||
* [NHLQ-6] - BinaryBooleanReducer produces incorrect expression
|
||||
* [NHLQ-10] - Aggregate Throws If No Records
|
||||
* [NHLQ-13] - Count and OrderBy missbehave
|
||||
* [NHLQ-15] - Bug in "Any" linq method when one-to-many and many-to-one methods are involved
|
||||
* [NHLQ-22] - MemberNameVisitor can return wrong name for Collection
|
||||
|
||||
|
||||
** New Feature
|
||||
* [NHLQ-23] - Support for the entity-name feature
|
||||
|
||||
** Patch
|
||||
* [NHLQ-7] - Nested And inside Or
|
||||
* [NHLQ-9] - Patch to enable compiling with VS2008 SP1 RTM
|
||||
* [NHLQ-17] - NHibernate.Linq doesn't work with proxy interfaces
|
||||
* [NHLQ-21] - Problem on retrieve name of properties in Query Linq with auto relationship...
|
||||
* [NHLQ-27] - Constant Where not evaluated
|
||||
* [NHLQ-28] - NAnt build script for NHibernate.Linq
|
||||
* [NHLQ-31] - Missing Dictionary.ContainsKey check in SessionFactoryUtil
|
||||
* [NHLQ-32] - Source changes to compile with NH2.1 beta
|
||||
* [NHLQ-33] - A patch to fix three bugs and expose one small, but useful feature.
|
||||
|
||||
|
5766
lib/nhibernate/FluentNHibernate.XML
Normal file
5766
lib/nhibernate/FluentNHibernate.XML
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lib/nhibernate/FluentNHibernate.dll
Normal file
BIN
lib/nhibernate/FluentNHibernate.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
lib/nhibernate/NHibernate.dll
Normal file
BIN
lib/nhibernate/NHibernate.dll
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -62,17 +62,21 @@
|
||||
<Reference Include="ClaySharp">
|
||||
<HintPath>..\..\lib\claysharp\ClaySharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\nhibernate\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\nhibernate\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.0.812.4, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\moq\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate.ByteCode.Castle, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\NHibernate.ByteCode.Castle.dll</HintPath>
|
||||
<HintPath>..\..\lib\nhibernate\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.5.2.9222, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
|
@ -79,7 +79,7 @@ namespace Orchard.Core.Tests.Scheduling {
|
||||
_repository.Flush();
|
||||
_executor.Sweep();
|
||||
_repository.Flush();
|
||||
Assert.That(_repository.Count(x => true), Is.EqualTo(1));
|
||||
Assert.That(_repository.Count(x => x != null), Is.EqualTo(1));
|
||||
}
|
||||
|
||||
|
||||
|
@ -85,7 +85,7 @@ namespace Orchard.Core.Tests.Scheduling {
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
|
||||
var tasks = _repository.Fetch(x => true);
|
||||
var tasks = _repository.Fetch(x => x != null);
|
||||
Assert.That(tasks.Count(), Is.EqualTo(2));
|
||||
Assert.That(tasks, Has.All.Property("TaskType").EqualTo("Ignore"));
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
using FluentNHibernate.Cfg.Db;
|
||||
using Orchard.Data.Providers;
|
||||
using MsSqlCeConfiguration = FluentNHibernate.Cfg.Db.MsSqlCeConfiguration;
|
||||
|
||||
namespace Orchard.Specs.Hosting {
|
||||
public class TraceEnabledDataServicesProviderFactory : IDataServicesProviderFactory {
|
||||
|
@ -69,7 +69,7 @@
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\FluentNHibernate.dll</HintPath>
|
||||
<HintPath>..\..\lib\nhibernate\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentPath, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@ -79,13 +79,17 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\htmlagilitypack\HtmlAgilityPack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\nhibernate\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\NHibernate.dll</HintPath>
|
||||
<HintPath>..\..\lib\nhibernate\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.5.2.9222, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
|
@ -65,9 +65,9 @@
|
||||
<Reference Include="ClaySharp">
|
||||
<HintPath>..\..\lib\claysharp\ClaySharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=1.0.0.593, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<Reference Include="FluentNHibernate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\FluentNHibernate.dll</HintPath>
|
||||
<HintPath>..\..\lib\nhibernate\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentPath">
|
||||
<HintPath>..\..\lib\fluentpath\FluentPath.dll</HintPath>
|
||||
@ -76,6 +76,10 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\sharpziplib\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\nhibernate\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IronRuby, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\dlr\IronRuby.dll</HintPath>
|
||||
@ -96,13 +100,9 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\moq\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<Reference Include="NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate.ByteCode.Castle, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\NHibernate.ByteCode.Castle.dll</HintPath>
|
||||
<HintPath>..\..\lib\nhibernate\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NuGet.Core, Version=1.0.11220.104, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@ -299,7 +299,9 @@
|
||||
<EmbeddedResource Include="Recipes\Services\FoldersData\Sample1\Module.txt" />
|
||||
<EmbeddedResource Include="Recipes\Services\FoldersData\Sample1\Recipes\cms.recipe.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
@ -201,7 +201,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
_session.Clear();
|
||||
|
||||
var ascending = _manager.Query("gamma")
|
||||
.OrderBy<GammaRecord, string>(x => x.Frap)
|
||||
.OrderBy<GammaRecord>(x => x.Frap)
|
||||
.List<GammaPart>().ToList();
|
||||
|
||||
Assert.That(ascending.Count(), Is.EqualTo(5));
|
||||
@ -229,11 +229,11 @@ namespace Orchard.Tests.ContentManagement {
|
||||
_session.Flush();
|
||||
|
||||
var reverseById = _manager.Query()
|
||||
.OrderByDescending<GammaRecord, int>(x => x.Id)
|
||||
.OrderByDescending<GammaRecord>(x => x.Id)
|
||||
.List();
|
||||
|
||||
var subset = _manager.Query()
|
||||
.OrderByDescending<GammaRecord, int>(x => x.Id)
|
||||
.OrderByDescending<GammaRecord>(x => x.Id)
|
||||
.Slice(2, 3);
|
||||
|
||||
Assert.That(subset.Count(), Is.EqualTo(3));
|
||||
|
@ -367,7 +367,7 @@ namespace Orchard.Tests.ContentManagement {
|
||||
_session.Flush();
|
||||
_session.Clear();
|
||||
|
||||
foreach (var x in _container.Resolve<IRepository<ContentItemVersionRecord>>().Fetch(x => true)) {
|
||||
foreach (var x in _container.Resolve<IRepository<ContentItemVersionRecord>>().Fetch(x => x != null)) {
|
||||
Trace.WriteLine(string.Format("{0}/{1} #{2} published:{3} latest:{4}",
|
||||
x.ContentItemRecord.Id,
|
||||
x.Id,
|
||||
|
@ -45,7 +45,7 @@ namespace Orchard.Tests.DataMigration {
|
||||
}
|
||||
|
||||
public void InitDb() {
|
||||
foreach ( var record in _repository.Fetch(m => true) ) {
|
||||
foreach ( var record in _repository.Fetch(m => m != null) ) {
|
||||
_repository.Delete(record);
|
||||
}
|
||||
_repository.Flush();
|
||||
|
@ -1,15 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentNHibernate;
|
||||
using FluentNHibernate.Automapping;
|
||||
using FluentNHibernate.Automapping.Alterations;
|
||||
using FluentNHibernate.Cfg;
|
||||
using FluentNHibernate.Cfg.Db;
|
||||
using FluentNHibernate.Diagnostics;
|
||||
using NHibernate;
|
||||
using NHibernate.Tool.hbm2ddl;
|
||||
using Orchard.Data;
|
||||
using Orchard.Data.Providers;
|
||||
using Orchard.Environment.ShellBuilders.Models;
|
||||
using MsSqlCeConfiguration = FluentNHibernate.Cfg.Db.MsSqlCeConfiguration;
|
||||
|
||||
namespace Orchard.Tests {
|
||||
public static class DataUtility {
|
||||
@ -65,6 +68,14 @@ namespace Orchard.Tests {
|
||||
return _types;
|
||||
}
|
||||
|
||||
public void LogSource(IDiagnosticLogger logger) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetIdentifier() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentNHibernate;
|
||||
using FluentNHibernate.Automapping;
|
||||
using FluentNHibernate.Cfg;
|
||||
using FluentNHibernate.Cfg.Db;
|
||||
using FluentNHibernate.Diagnostics;
|
||||
using NHibernate.Criterion;
|
||||
using NHibernate.Tool.hbm2ddl;
|
||||
using NUnit.Framework;
|
||||
using Orchard.Data.Providers;
|
||||
using Orchard.Tests.Records;
|
||||
using MsSqlCeConfiguration = FluentNHibernate.Cfg.Db.MsSqlCeConfiguration;
|
||||
|
||||
namespace Orchard.Tests {
|
||||
[TestFixture]
|
||||
@ -26,6 +29,14 @@ namespace Orchard.Tests {
|
||||
return _types;
|
||||
}
|
||||
|
||||
public void LogSource(IDiagnosticLogger logger) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetIdentifier() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace Orchard.Tests {
|
||||
|
||||
[Test]
|
||||
public void WhereClauseShouldLimitResults() {
|
||||
var foos = from f in _session.Linq<FooRecord>() where f.Name == "two" || f.Name == "one" select f;
|
||||
var foos = from f in _session.Query<FooRecord>() where f.Name == "two" || f.Name == "one" select f;
|
||||
|
||||
Assert.That(foos.Count(), Is.EqualTo(2));
|
||||
Assert.That(foos, Has.Some.Property("Name").EqualTo("one"));
|
||||
|
@ -75,9 +75,13 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\claysharp\ClaySharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=1.0.0.593, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<Reference Include="FluentNHibernate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\FluentNHibernate.dll</HintPath>
|
||||
<HintPath>..\..\lib\nhibernate\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\nhibernate\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IronRuby, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@ -102,17 +106,9 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\moq\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<Reference Include="NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate.ByteCode.Castle, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\NHibernate.ByteCode.Castle.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate.Linq, Version=1.0.0.4000, Culture=neutral, PublicKeyToken=444cf6a87fdab271, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\linqnhibernate\NHibernate.Linq.dll</HintPath>
|
||||
<HintPath>..\..\lib\nhibernate\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=2.5.2.9222, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
|
@ -12,38 +12,38 @@ namespace Orchard.Core.Containers.Extensions {
|
||||
switch (partAndProperty) {
|
||||
case "ContainablePart.Weight":
|
||||
query = descendingOrder
|
||||
? query.OrderByDescending<ContainablePartRecord, int>(record => record.Weight)
|
||||
: query.OrderBy<ContainablePartRecord, int>(record => record.Weight);
|
||||
? query.OrderByDescending<ContainablePartRecord>(record => record.Weight)
|
||||
: query.OrderBy<ContainablePartRecord>(record => record.Weight);
|
||||
break;
|
||||
case "TitlePart.Title":
|
||||
query = descendingOrder
|
||||
? query.OrderByDescending<TitlePartRecord, string>(record => record.Title)
|
||||
: query.OrderBy<TitlePartRecord, string>(record => record.Title);
|
||||
? query.OrderByDescending<TitlePartRecord>(record => record.Title)
|
||||
: query.OrderBy<TitlePartRecord>(record => record.Title);
|
||||
break;
|
||||
case "CustomPropertiesPart.CustomOne":
|
||||
query = descendingOrder
|
||||
? query.OrderByDescending<CustomPropertiesPartRecord, string>(record => record.CustomOne)
|
||||
: query.OrderBy<CustomPropertiesPartRecord, string>(record => record.CustomOne);
|
||||
? query.OrderByDescending<CustomPropertiesPartRecord>(record => record.CustomOne)
|
||||
: query.OrderBy<CustomPropertiesPartRecord>(record => record.CustomOne);
|
||||
break;
|
||||
case "CustomPropertiesPart.CustomTwo":
|
||||
query = descendingOrder
|
||||
? query.OrderByDescending<CustomPropertiesPartRecord, string>(record => record.CustomTwo)
|
||||
: query.OrderBy<CustomPropertiesPartRecord, string>(record => record.CustomTwo);
|
||||
? query.OrderByDescending<CustomPropertiesPartRecord>(record => record.CustomTwo)
|
||||
: query.OrderBy<CustomPropertiesPartRecord>(record => record.CustomTwo);
|
||||
break;
|
||||
case "CustomPropertiesPart.CustomThree":
|
||||
query = descendingOrder
|
||||
? query.OrderByDescending<CustomPropertiesPartRecord, string>(record => record.CustomThree)
|
||||
: query.OrderBy<CustomPropertiesPartRecord, string>(record => record.CustomThree);
|
||||
? query.OrderByDescending<CustomPropertiesPartRecord>(record => record.CustomThree)
|
||||
: query.OrderBy<CustomPropertiesPartRecord>(record => record.CustomThree);
|
||||
break;
|
||||
case "CommonPart.CreatedUtc":
|
||||
query = descendingOrder
|
||||
? query.OrderByDescending<CommonPartRecord, DateTime?>(record => record.CreatedUtc)
|
||||
: query.OrderBy<CommonPartRecord, DateTime?>(record => record.CreatedUtc);
|
||||
? query.OrderByDescending<CommonPartRecord>(record => record.CreatedUtc)
|
||||
: query.OrderBy<CommonPartRecord>(record => record.CreatedUtc);
|
||||
break;
|
||||
default: // "CommonPart.PublishedUtc"
|
||||
query = descendingOrder
|
||||
? query.OrderByDescending<CommonPartRecord, DateTime?>(record => record.PublishedUtc)
|
||||
: query.OrderBy<CommonPartRecord, DateTime?>(record => record.PublishedUtc);
|
||||
? query.OrderByDescending<CommonPartRecord>(record => record.PublishedUtc)
|
||||
: query.OrderBy<CommonPartRecord>(record => record.PublishedUtc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -71,14 +71,14 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
switch (model.Options.OrderBy) {
|
||||
case ContentsOrder.Modified:
|
||||
//query = query.OrderByDescending<ContentPartRecord, int>(ci => ci.ContentItemRecord.Versions.Single(civr => civr.Latest).Id);
|
||||
query = query.OrderByDescending<CommonPartRecord, DateTime?>(cr => cr.ModifiedUtc);
|
||||
query = query.OrderByDescending<CommonPartRecord>(cr => cr.ModifiedUtc);
|
||||
break;
|
||||
case ContentsOrder.Published:
|
||||
query = query.OrderByDescending<CommonPartRecord, DateTime?>(cr => cr.PublishedUtc);
|
||||
query = query.OrderByDescending<CommonPartRecord>(cr => cr.PublishedUtc);
|
||||
break;
|
||||
case ContentsOrder.Created:
|
||||
//query = query.OrderByDescending<ContentPartRecord, int>(ci => ci.Id);
|
||||
query = query.OrderByDescending<CommonPartRecord, DateTime?>(cr => cr.CreatedUtc);
|
||||
query = query.OrderByDescending<CommonPartRecord>(cr => cr.CreatedUtc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace Orchard.Core.Settings.Descriptor {
|
||||
}
|
||||
|
||||
private ShellDescriptorRecord GetDescriptorRecord() {
|
||||
return _shellDescriptorRepository.Get(x => true);
|
||||
return _shellDescriptorRepository.Get(x => x != null);
|
||||
}
|
||||
|
||||
public void UpdateShellDescriptor(int priorSerialNumber, IEnumerable<ShellFeature> enabledFeatures, IEnumerable<ShellParameter> parameters) {
|
||||
|
@ -19,7 +19,7 @@ namespace Orchard.Core.Settings.State {
|
||||
}
|
||||
|
||||
public ShellState GetShellState() {
|
||||
var stateRecord = _shellStateRepository.Get(x => true) ?? new ShellStateRecord();
|
||||
var stateRecord = _shellStateRepository.Get(x => x != null) ?? new ShellStateRecord();
|
||||
var descriptor = _shellDescriptorManager.GetShellDescriptor();
|
||||
var extraFeatures = descriptor == null ? Enumerable.Empty<string>() : descriptor.Features
|
||||
.Select(r => r.Name)
|
||||
@ -40,7 +40,7 @@ namespace Orchard.Core.Settings.State {
|
||||
}
|
||||
|
||||
private ShellFeatureStateRecord FeatureRecord(string name) {
|
||||
var stateRecord = _shellStateRepository.Get(x => true) ?? new ShellStateRecord();
|
||||
var stateRecord = _shellStateRepository.Get(x => x != null) ?? new ShellStateRecord();
|
||||
var record = stateRecord.Features.SingleOrDefault(x => x.Name == name);
|
||||
if (record == null) {
|
||||
record = new ShellFeatureStateRecord { Name = name };
|
||||
|
@ -69,7 +69,7 @@ namespace Orchard.Comments.Controllers {
|
||||
|
||||
var pagerShape = Shape.Pager(pager).TotalItemCount(comments.Count());
|
||||
var entries = comments
|
||||
.OrderByDescending<CommentPartRecord, DateTime?>(cpr => cpr.CommentDateUtc)
|
||||
.OrderByDescending<CommentPartRecord>(cpr => cpr.CommentDateUtc)
|
||||
.Slice(pager.GetStartIndex(), pager.PageSize)
|
||||
.ToList()
|
||||
.Select(comment => CreateCommentEntry(comment.Record));
|
||||
|
@ -132,13 +132,13 @@ namespace Orchard.Lists.Controllers {
|
||||
: query.Join<CommonPartRecord>().Where(cr => cr.Container.Id == containerId);
|
||||
switch (orderBy) {
|
||||
case ContentsOrder.Modified:
|
||||
query = query.OrderByDescending<CommonPartRecord, DateTime?>(cr => cr.ModifiedUtc);
|
||||
query = query.OrderByDescending<CommonPartRecord>(cr => cr.ModifiedUtc);
|
||||
break;
|
||||
case ContentsOrder.Published:
|
||||
query = query.OrderByDescending<CommonPartRecord, DateTime?>(cr => cr.PublishedUtc);
|
||||
query = query.OrderByDescending<CommonPartRecord>(cr => cr.PublishedUtc);
|
||||
break;
|
||||
case ContentsOrder.Created:
|
||||
query = query.OrderByDescending<CommonPartRecord, DateTime?>(cr => cr.CreatedUtc);
|
||||
query = query.OrderByDescending<CommonPartRecord>(cr => cr.CreatedUtc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -40,8 +40,9 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NHibernate">
|
||||
<HintPath>..\..\..\..\lib\fluentnhibernate\NHibernate.dll</HintPath>
|
||||
<Reference Include="NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\lib\nhibernate\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
|
@ -55,9 +55,6 @@
|
||||
<HintPath>..\..\lib\aspnetmvc\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate.ByteCode.Castle, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\lib\fluentnhibernate\NHibernate.ByteCode.Castle.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NuGet.Core, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\lib\nuget\NuGet.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
@ -1,29 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection.Emit;
|
||||
using FluentNHibernate;
|
||||
using NHibernate;
|
||||
using NHibernate.Criterion;
|
||||
using NHibernate.Impl;
|
||||
using NHibernate.Linq;
|
||||
using Orchard.ContentManagement.Records;
|
||||
using Orchard.Data;
|
||||
using Orchard.Utility.Extensions;
|
||||
using NHibernate.Transform;
|
||||
using NHibernate.SqlCommand;
|
||||
using System.Reflection;
|
||||
using Orchard.Data.Conventions;
|
||||
using Expression = System.Linq.Expressions.Expression;
|
||||
|
||||
namespace Orchard.ContentManagement {
|
||||
public class DefaultContentQuery : IContentQuery {
|
||||
private readonly ISessionLocator _sessionLocator;
|
||||
private ISession _session;
|
||||
private ICriteria _itemVersionCriteria;
|
||||
private IQueryOver<ContentItemVersionRecord, ContentItemVersionRecord> _itemVersionQueryOver;
|
||||
private readonly IDictionary<string, object> _joins;
|
||||
|
||||
private VersionOptions _versionOptions;
|
||||
|
||||
public DefaultContentQuery(IContentManager contentManager, ISessionLocator sessionLocator) {
|
||||
_sessionLocator = sessionLocator;
|
||||
ContentManager = contentManager;
|
||||
|
||||
_joins = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
public IContentManager ContentManager { get; private set; }
|
||||
@ -34,40 +38,60 @@ namespace Orchard.ContentManagement {
|
||||
return _session;
|
||||
}
|
||||
|
||||
ICriteria BindCriteriaByPath(ICriteria criteria, string path) {
|
||||
return criteria.GetCriteriaByPath(path) ?? criteria.CreateCriteria(path);
|
||||
IQueryOver<ContentItemVersionRecord, TRecord> BindQueryOverByPath<TRecord, U>(IQueryOver<ContentItemVersionRecord, U> queryOver, string name) {
|
||||
if (_joins.ContainsKey(typeof(TRecord).Name)) {
|
||||
return (IQueryOver<ContentItemVersionRecord, TRecord>)_joins[typeof(TRecord).Name];
|
||||
}
|
||||
|
||||
// public TPartRecord TPartRecord {get;set;}
|
||||
var dynamicMethod = new DynamicMethod(name, typeof(TRecord), null, typeof(U));
|
||||
var syntheticMethod = new ContentItemAlteration.SyntheticMethodInfo(dynamicMethod, typeof(U));
|
||||
var syntheticProperty = new ContentItemAlteration.SyntheticPropertyInfo(syntheticMethod);
|
||||
|
||||
// record => record.TPartRecord
|
||||
var parameter = Expression.Parameter(typeof(U), "record");
|
||||
var syntheticExpression = (Expression<Func<U, TRecord>>)Expression.Lambda(
|
||||
typeof(Func<U, TRecord>),
|
||||
Expression.Property(parameter, syntheticProperty),
|
||||
parameter);
|
||||
|
||||
var join = queryOver.JoinQueryOver(syntheticExpression);
|
||||
_joins[typeof(TRecord).Name] = join;
|
||||
|
||||
return join;
|
||||
}
|
||||
|
||||
ICriteria BindTypeCriteria() {
|
||||
IQueryOver<ContentItemVersionRecord, ContentTypeRecord> BindTypeQueryOver() {
|
||||
// ([ContentItemVersionRecord] >join> [ContentItemRecord]) >join> [ContentType]
|
||||
|
||||
return BindCriteriaByPath(BindItemCriteria(), "ContentType");
|
||||
return BindQueryOverByPath<ContentTypeRecord, ContentItemRecord>(BindItemQueryOver(), "ContentType");
|
||||
}
|
||||
|
||||
ICriteria BindItemCriteria() {
|
||||
IQueryOver<ContentItemVersionRecord, ContentItemRecord> BindItemQueryOver() {
|
||||
// [ContentItemVersionRecord] >join> [ContentItemRecord]
|
||||
|
||||
return BindCriteriaByPath(BindItemVersionCriteria(), "ContentItemRecord");
|
||||
return BindQueryOverByPath<ContentItemRecord, ContentItemVersionRecord>(BindItemVersionQueryOver(), "ContentItemRecord");
|
||||
}
|
||||
|
||||
ICriteria BindItemVersionCriteria() {
|
||||
if (_itemVersionCriteria == null) {
|
||||
_itemVersionCriteria = BindSession().CreateCriteria<ContentItemVersionRecord>();
|
||||
IQueryOver<ContentItemVersionRecord, ContentItemVersionRecord> BindItemVersionQueryOver() {
|
||||
if (_itemVersionQueryOver == null) {
|
||||
_itemVersionQueryOver = BindSession().QueryOver<ContentItemVersionRecord>();
|
||||
}
|
||||
return _itemVersionCriteria;
|
||||
return _itemVersionQueryOver;
|
||||
}
|
||||
|
||||
ICriteria BindPartCriteria<TRecord>() where TRecord : ContentPartRecord {
|
||||
if (typeof(TRecord).IsSubclassOf(typeof(ContentPartVersionRecord))) {
|
||||
return BindCriteriaByPath(BindItemVersionCriteria(), typeof(TRecord).Name);
|
||||
IQueryOver<ContentItemVersionRecord, TRecord> BindPartQueryOver<TRecord>() where TRecord : ContentPartRecord {
|
||||
if (typeof (TRecord).IsSubclassOf(typeof (ContentPartVersionRecord))) {
|
||||
return BindQueryOverByPath<TRecord, ContentItemVersionRecord>(BindItemVersionQueryOver(), typeof(TRecord).Name);
|
||||
}
|
||||
return BindCriteriaByPath(BindItemCriteria(), typeof(TRecord).Name);
|
||||
|
||||
return BindQueryOverByPath<TRecord, ContentItemRecord>(BindItemQueryOver(), typeof(TRecord).Name);
|
||||
}
|
||||
|
||||
|
||||
private void ForType(params string[] contentTypeNames) {
|
||||
if (contentTypeNames != null && contentTypeNames.Length != 0)
|
||||
BindTypeCriteria().Add(Restrictions.InG("Name", contentTypeNames));
|
||||
BindTypeQueryOver().Where(Restrictions.InG("Name", contentTypeNames));
|
||||
}
|
||||
|
||||
public void ForVersion(VersionOptions options) {
|
||||
@ -76,86 +100,48 @@ namespace Orchard.ContentManagement {
|
||||
|
||||
private void Where<TRecord>() where TRecord : ContentPartRecord {
|
||||
// this simply demands an inner join
|
||||
BindPartCriteria<TRecord>();
|
||||
BindPartQueryOver<TRecord>();
|
||||
}
|
||||
|
||||
private void Where<TRecord>(Expression<Func<TRecord, bool>> predicate) where TRecord : ContentPartRecord {
|
||||
|
||||
// build a linq to nhibernate expression
|
||||
var options = new QueryOptions();
|
||||
var queryProvider = new NHibernateQueryProvider(BindSession(), options);
|
||||
var queryable = new Query<TRecord>(queryProvider, options).Where(predicate);
|
||||
|
||||
// translate it into the nhibernate ICriteria implementation
|
||||
var criteria = (CriteriaImpl)queryProvider.TranslateExpression(queryable.Expression);
|
||||
|
||||
// attach the criterion from the predicate to this query's criteria for the record
|
||||
var recordCriteria = BindPartCriteria<TRecord>();
|
||||
foreach (var expressionEntry in criteria.IterateExpressionEntries()) {
|
||||
recordCriteria.Add(expressionEntry.Criterion);
|
||||
}
|
||||
BindPartQueryOver<TRecord>().Where(predicate);
|
||||
}
|
||||
|
||||
private void OrderBy<TRecord, TKey>(Expression<Func<TRecord, TKey>> keySelector) where TRecord : ContentPartRecord {
|
||||
// build a linq to nhibernate expression
|
||||
var options = new QueryOptions();
|
||||
var queryProvider = new NHibernateQueryProvider(BindSession(), options);
|
||||
var queryable = new Query<TRecord>(queryProvider, options).OrderBy(keySelector);
|
||||
|
||||
// translate it into the nhibernate ordering
|
||||
var criteria = (CriteriaImpl)queryProvider.TranslateExpression(queryable.Expression);
|
||||
|
||||
// attaching orderings to the query's criteria
|
||||
var recordCriteria = BindPartCriteria<TRecord>();
|
||||
foreach (var ordering in criteria.IterateOrderings()) {
|
||||
recordCriteria.AddOrder(ordering.Order);
|
||||
}
|
||||
private void OrderBy<TRecord>(Expression<Func<TRecord, object>> keySelector) where TRecord : ContentPartRecord {
|
||||
BindPartQueryOver<TRecord>().OrderBy(keySelector).Asc();
|
||||
}
|
||||
|
||||
private void OrderByDescending<TRecord, TKey>(Expression<Func<TRecord, TKey>> keySelector) where TRecord : ContentPartRecord {
|
||||
// build a linq to nhibernate expression
|
||||
var options = new QueryOptions();
|
||||
var queryProvider = new NHibernateQueryProvider(BindSession(), options);
|
||||
var queryable = new Query<TRecord>(queryProvider, options).OrderByDescending(keySelector);
|
||||
|
||||
// translate it into the nhibernate ICriteria implementation
|
||||
var criteria = (CriteriaImpl)queryProvider.TranslateExpression(queryable.Expression);
|
||||
|
||||
// attaching orderings to the query's criteria
|
||||
var recordCriteria = BindPartCriteria<TRecord>();
|
||||
foreach (var ordering in criteria.IterateOrderings()) {
|
||||
recordCriteria.AddOrder(ordering.Order);
|
||||
}
|
||||
private void OrderByDescending<TRecord>(Expression<Func<TRecord, object>> keySelector) where TRecord : ContentPartRecord {
|
||||
BindPartQueryOver<TRecord>().OrderBy(keySelector).Desc();
|
||||
}
|
||||
|
||||
private IEnumerable<ContentItem> Slice(int skip, int count) {
|
||||
var criteria = BindItemVersionCriteria();
|
||||
|
||||
criteria.ApplyVersionOptionsRestrictions(_versionOptions);
|
||||
var queryOver = BindItemVersionQueryOver();
|
||||
|
||||
criteria.SetFetchMode("ContentItemRecord", FetchMode.Eager);
|
||||
criteria.SetFetchMode("ContentItemRecord.ContentType", FetchMode.Eager);
|
||||
queryOver.ApplyVersionOptionsRestrictions(_versionOptions);
|
||||
|
||||
// TODO: put 'removed false' filter in place
|
||||
if (skip != 0) {
|
||||
criteria = criteria.SetFirstResult(skip);
|
||||
queryOver.Skip(skip);
|
||||
}
|
||||
|
||||
if (count != 0) {
|
||||
criteria = criteria.SetMaxResults(count);
|
||||
queryOver.Take(count);
|
||||
}
|
||||
return criteria
|
||||
.List<ContentItemVersionRecord>()
|
||||
.Select(x => ContentManager.Get(x.Id, VersionOptions.VersionRecord(x.Id)))
|
||||
.ToReadOnlyCollection();
|
||||
|
||||
return new ReadOnlyCollection<ContentItem>(queryOver
|
||||
.List<ContentItemVersionRecord>()
|
||||
.Select(x => ContentManager.Get(x.Id, VersionOptions.VersionRecord(x.Id)))
|
||||
.ToList());
|
||||
}
|
||||
|
||||
int Count() {
|
||||
var criteria = (ICriteria)BindItemVersionCriteria().Clone();
|
||||
criteria.ClearOrders();
|
||||
var queryOver = BindItemVersionQueryOver();
|
||||
queryOver.ClearOrders();
|
||||
|
||||
criteria.ApplyVersionOptionsRestrictions(_versionOptions);
|
||||
queryOver.ApplyVersionOptionsRestrictions(_versionOptions);
|
||||
|
||||
return criteria.SetProjection(Projections.RowCount()).UniqueResult<Int32>();
|
||||
return queryOver.Select(Projections.RowCount()).FutureValue<int>().Value;
|
||||
}
|
||||
|
||||
IContentQuery<TPart> IContentQuery.ForPart<TPart>() {
|
||||
@ -209,12 +195,12 @@ namespace Orchard.ContentManagement {
|
||||
return new ContentQuery<T, TRecord>(_query);
|
||||
}
|
||||
|
||||
IContentQuery<T, TRecord> IContentQuery<T>.OrderBy<TRecord, TKey>(Expression<Func<TRecord, TKey>> keySelector) {
|
||||
IContentQuery<T, TRecord> IContentQuery<T>.OrderBy<TRecord>(Expression<Func<TRecord, object>> keySelector) {
|
||||
_query.OrderBy(keySelector);
|
||||
return new ContentQuery<T, TRecord>(_query);
|
||||
return new ContentQuery<T, TRecord>(_query);
|
||||
}
|
||||
|
||||
IContentQuery<T, TRecord> IContentQuery<T>.OrderByDescending<TRecord, TKey>(Expression<Func<TRecord, TKey>> keySelector) {
|
||||
IContentQuery<T, TRecord> IContentQuery<T>.OrderByDescending<TRecord>(Expression<Func<TRecord, object>> keySelector) {
|
||||
_query.OrderByDescending(keySelector);
|
||||
return new ContentQuery<T, TRecord>(_query);
|
||||
}
|
||||
@ -238,24 +224,23 @@ namespace Orchard.ContentManagement {
|
||||
return this;
|
||||
}
|
||||
|
||||
IContentQuery<T, TR> IContentQuery<T, TR>.OrderBy<TKey>(Expression<Func<TR, TKey>> keySelector) {
|
||||
IContentQuery<T, TR> IContentQuery<T, TR>.OrderBy(Expression<Func<TR, object>> keySelector) {
|
||||
_query.OrderBy(keySelector);
|
||||
return this;
|
||||
}
|
||||
|
||||
IContentQuery<T, TR> IContentQuery<T, TR>.OrderByDescending<TKey>(Expression<Func<TR, TKey>> keySelector) {
|
||||
IContentQuery<T, TR> IContentQuery<T, TR>.OrderByDescending(Expression<Func<TR, object>> keySelector) {
|
||||
_query.OrderByDescending(keySelector);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public IContentQuery<T, TR> WithQueryHints(QueryHints hints) {
|
||||
if (hints == QueryHints.Empty) {
|
||||
return this;
|
||||
}
|
||||
|
||||
var contentItemVersionCriteria = _query.BindItemVersionCriteria();
|
||||
var contentItemCriteria = _query.BindItemCriteria();
|
||||
var contentItemVersionCriteria = _query.BindItemVersionQueryOver();
|
||||
var contentItemCriteria = _query.BindItemQueryOver();
|
||||
|
||||
var contentItemMetadata = _query._session.SessionFactory.GetClassMetadata(typeof(ContentItemRecord));
|
||||
var contentItemVersionMetadata = _query._session.SessionFactory.GetClassMetadata(typeof(ContentItemVersionRecord));
|
||||
@ -268,18 +253,20 @@ namespace Orchard.ContentManagement {
|
||||
|
||||
// locate hints that match properties in the ContentItemVersionRecord
|
||||
foreach (var hit in contentItemVersionMetadata.PropertyNames.Where(hintDictionary.ContainsKey).SelectMany(key => hintDictionary[key])) {
|
||||
contentItemVersionCriteria.SetFetchMode(hit.Hint, FetchMode.Eager);
|
||||
hit.Segments.Take(hit.Segments.Count() - 1).Aggregate(contentItemVersionCriteria, ExtendCriteria);
|
||||
// todo
|
||||
// contentItemVersionCriteria.Fetch(hit.Hint);
|
||||
// hit.Segments.Take(hit.Segments.Count() - 1).Aggregate(contentItemVersionCriteria, ExtendCriteria);
|
||||
}
|
||||
|
||||
// locate hints that match properties in the ContentItemRecord
|
||||
foreach (var hit in contentItemMetadata.PropertyNames.Where(hintDictionary.ContainsKey).SelectMany(key => hintDictionary[key])) {
|
||||
contentItemVersionCriteria.SetFetchMode("ContentItemRecord." + hit.Hint, FetchMode.Eager);
|
||||
hit.Segments.Take(hit.Segments.Count() - 1).Aggregate(contentItemCriteria, ExtendCriteria);
|
||||
// todo
|
||||
// contentItemVersionCriteria.Fetch("ContentItemRecord." + hit.Hint, FetchMode.Eager);
|
||||
// hit.Segments.Take(hit.Segments.Count() - 1).Aggregate(contentItemCriteria, ExtendCriteria);
|
||||
}
|
||||
|
||||
if (hintDictionary.SelectMany(x => x.Value).Any(x => x.Segments.Count() > 1))
|
||||
contentItemVersionCriteria.SetResultTransformer(new DistinctRootEntityResultTransformer());
|
||||
contentItemVersionCriteria.TransformUsing(new DistinctRootEntityResultTransformer());
|
||||
|
||||
return this;
|
||||
}
|
||||
@ -305,18 +292,18 @@ namespace Orchard.ContentManagement {
|
||||
}
|
||||
|
||||
internal static class CriteriaExtensions {
|
||||
internal static void ApplyVersionOptionsRestrictions(this ICriteria criteria, VersionOptions versionOptions) {
|
||||
internal static void ApplyVersionOptionsRestrictions<T>(this IQueryOver<T, T> criteria, VersionOptions versionOptions) {
|
||||
if (versionOptions == null) {
|
||||
criteria.Add(Restrictions.Eq("Published", true));
|
||||
criteria.Where(Restrictions.Eq("Published", true));
|
||||
}
|
||||
else if (versionOptions.IsPublished) {
|
||||
criteria.Add(Restrictions.Eq("Published", true));
|
||||
criteria.Where(Restrictions.Eq("Published", true));
|
||||
}
|
||||
else if (versionOptions.IsLatest) {
|
||||
criteria.Add(Restrictions.Eq("Latest", true));
|
||||
criteria.Where(Restrictions.Eq("Latest", true));
|
||||
}
|
||||
else if (versionOptions.IsDraft) {
|
||||
criteria.Add(Restrictions.And(
|
||||
criteria.Where(Restrictions.And(
|
||||
Restrictions.Eq("Latest", true),
|
||||
Restrictions.Eq("Published", false)));
|
||||
}
|
||||
|
@ -21,16 +21,16 @@ namespace Orchard.ContentManagement {
|
||||
IContentQuery<TPart, TRecord> Join<TRecord>() where TRecord : ContentPartRecord;
|
||||
|
||||
IContentQuery<TPart, TRecord> Where<TRecord>(Expression<Func<TRecord, bool>> predicate) where TRecord : ContentPartRecord;
|
||||
IContentQuery<TPart, TRecord> OrderBy<TRecord, TKey>(Expression<Func<TRecord, TKey>> keySelector) where TRecord : ContentPartRecord;
|
||||
IContentQuery<TPart, TRecord> OrderByDescending<TRecord, TKey>(Expression<Func<TRecord, TKey>> keySelector) where TRecord : ContentPartRecord;
|
||||
IContentQuery<TPart, TRecord> OrderBy<TRecord>(Expression<Func<TRecord, object>> keySelector) where TRecord : ContentPartRecord;
|
||||
IContentQuery<TPart, TRecord> OrderByDescending<TRecord>(Expression<Func<TRecord, object>> keySelector) where TRecord : ContentPartRecord;
|
||||
}
|
||||
|
||||
public interface IContentQuery<TPart, TRecord> : IContentQuery<TPart> where TPart : IContent where TRecord : ContentPartRecord {
|
||||
new IContentQuery<TPart, TRecord> ForVersion(VersionOptions options);
|
||||
|
||||
IContentQuery<TPart, TRecord> Where(Expression<Func<TRecord, bool>> predicate);
|
||||
IContentQuery<TPart, TRecord> OrderBy<TKey>(Expression<Func<TRecord, TKey>> keySelector);
|
||||
IContentQuery<TPart, TRecord> OrderByDescending<TKey>(Expression<Func<TRecord, TKey>> keySelector);
|
||||
IContentQuery<TPart, TRecord> OrderBy(Expression<Func<TRecord, object>> keySelector);
|
||||
IContentQuery<TPart, TRecord> OrderByDescending(Expression<Func<TRecord, object>> keySelector);
|
||||
|
||||
IContentQuery<TPart, TRecord> WithQueryHints(QueryHints hints);
|
||||
IContentQuery<TPart, TRecord> WithQueryHintsFor(string contentType);
|
||||
|
@ -1,16 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using FluentNHibernate.Automapping;
|
||||
using FluentNHibernate.Automapping.Alterations;
|
||||
using JetBrains.Annotations;
|
||||
using Orchard.Environment.ShellBuilders.Models;
|
||||
|
||||
namespace Orchard.ContentManagement.Records {
|
||||
class ContentItemAlteration : IAutoMappingAlteration {
|
||||
private readonly IEnumerable<RecordBlueprint> _recordDescriptors;
|
||||
|
||||
[UsedImplicitly]
|
||||
public ContentItemAlteration() {
|
||||
_recordDescriptors = Enumerable.Empty<RecordBlueprint>();
|
||||
}
|
||||
@ -53,7 +55,20 @@ namespace Orchard.ContentManagement.Records {
|
||||
class Alteration<TItemRecord, TPartRecord> : IAlteration<TItemRecord> {
|
||||
public void Override(AutoMapping<TItemRecord> mapping) {
|
||||
|
||||
mapping.References<TPartRecord>(typeof(TItemRecord), typeof(TPartRecord).Name, typeof(TPartRecord).Name)
|
||||
// public TPartRecord TPartRecord {get;set;}
|
||||
var name = typeof(TPartRecord).Name;
|
||||
var dynamicMethod = new DynamicMethod(name, typeof(TPartRecord), null, typeof(TItemRecord));
|
||||
var syntheticMethod = new SyntheticMethodInfo(dynamicMethod, typeof(TItemRecord));
|
||||
var syntheticProperty = new SyntheticPropertyInfo(syntheticMethod);
|
||||
|
||||
// record => record.TPartRecord
|
||||
var parameter = Expression.Parameter(typeof(TItemRecord), "record");
|
||||
var syntheticExpression = (Expression<Func<TItemRecord, TPartRecord>>)Expression.Lambda(
|
||||
typeof(Func<TItemRecord, TPartRecord>),
|
||||
Expression.Property(parameter, syntheticProperty),
|
||||
parameter);
|
||||
|
||||
mapping.References(syntheticExpression)
|
||||
.Access.NoOp()
|
||||
.Column("Id")
|
||||
.ForeignKey("none") // prevent foreign key constraint from ContentItem(Version)Record to TPartRecord
|
||||
@ -63,5 +78,163 @@ namespace Orchard.ContentManagement.Records {
|
||||
.Cascade.All();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Synthetic method around a dynamic method. We need this so that we can
|
||||
/// override the "static" method attributes, and also return a valid "DeclaringType".
|
||||
/// </summary>
|
||||
public class SyntheticMethodInfo : MethodInfo {
|
||||
private readonly DynamicMethod _dynamicMethod;
|
||||
private readonly Type _declaringType;
|
||||
|
||||
public SyntheticMethodInfo(DynamicMethod dynamicMethod, Type declaringType) {
|
||||
_dynamicMethod = dynamicMethod;
|
||||
_declaringType = declaringType;
|
||||
}
|
||||
|
||||
public override object[] GetCustomAttributes(bool inherit) {
|
||||
return _dynamicMethod.GetCustomAttributes(inherit);
|
||||
}
|
||||
|
||||
public override bool IsDefined(Type attributeType, bool inherit) {
|
||||
return IsDefined(attributeType, inherit);
|
||||
}
|
||||
|
||||
public override ParameterInfo[] GetParameters() {
|
||||
return _dynamicMethod.GetParameters();
|
||||
}
|
||||
|
||||
public override MethodImplAttributes GetMethodImplementationFlags() {
|
||||
return _dynamicMethod.GetMethodImplementationFlags();
|
||||
}
|
||||
|
||||
public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture) {
|
||||
return _dynamicMethod.Invoke(obj, invokeAttr, binder, parameters, culture);
|
||||
}
|
||||
|
||||
public override MethodInfo GetBaseDefinition() {
|
||||
return _dynamicMethod.GetBaseDefinition();
|
||||
}
|
||||
|
||||
public override ICustomAttributeProvider ReturnTypeCustomAttributes {
|
||||
get { return ReturnTypeCustomAttributes; }
|
||||
}
|
||||
|
||||
public override string Name {
|
||||
get { return _dynamicMethod.Name; }
|
||||
}
|
||||
|
||||
public override Type DeclaringType {
|
||||
get { return _declaringType; }
|
||||
}
|
||||
|
||||
public override Type ReflectedType {
|
||||
get { return _dynamicMethod.ReflectedType; }
|
||||
}
|
||||
|
||||
public override RuntimeMethodHandle MethodHandle {
|
||||
get { return _dynamicMethod.MethodHandle; }
|
||||
}
|
||||
|
||||
public override MethodAttributes Attributes {
|
||||
get { return _dynamicMethod.Attributes & ~MethodAttributes.Static; }
|
||||
}
|
||||
|
||||
public override object[] GetCustomAttributes(Type attributeType, bool inherit) {
|
||||
return _dynamicMethod.GetCustomAttributes(attributeType, inherit);
|
||||
}
|
||||
|
||||
public override Type ReturnType {
|
||||
get { return _dynamicMethod.ReturnType; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Synthetic property around a method info (the "getter" method).
|
||||
/// This is a minimal implementation enabling support for AutoMapping.References.
|
||||
/// </summary>
|
||||
public class SyntheticPropertyInfo : PropertyInfo {
|
||||
private readonly MethodInfo _getMethod;
|
||||
|
||||
public SyntheticPropertyInfo(MethodInfo getMethod) {
|
||||
_getMethod = getMethod;
|
||||
}
|
||||
|
||||
public override object[] GetCustomAttributes(bool inherit) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override bool IsDefined(Type attributeType, bool inherit) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override object GetValue(object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override MethodInfo[] GetAccessors(bool nonPublic) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override MethodInfo GetGetMethod(bool nonPublic) {
|
||||
return _getMethod;
|
||||
}
|
||||
|
||||
public override MethodInfo GetSetMethod(bool nonPublic) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public override ParameterInfo[] GetIndexParameters() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override string Name {
|
||||
get { return _getMethod.Name; }
|
||||
}
|
||||
|
||||
public override Type DeclaringType {
|
||||
get { return _getMethod.DeclaringType; }
|
||||
}
|
||||
|
||||
public override Type ReflectedType {
|
||||
get { return _getMethod.ReflectedType; }
|
||||
}
|
||||
|
||||
public override Type PropertyType {
|
||||
get { return _getMethod.ReturnType; }
|
||||
}
|
||||
|
||||
public override PropertyAttributes Attributes {
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override bool CanRead {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override bool CanWrite {
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public override object[] GetCustomAttributes(Type attributeType, bool inherit) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override int MetadataToken {
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public override Module Module {
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public override MemberTypes MemberType {
|
||||
get { return MemberTypes.Property; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,6 @@ namespace Orchard.ContentManagement.Records {
|
||||
|
||||
[StringLengthMax]
|
||||
public virtual string Data { get { return Infoset.Data; } set { Infoset.Data = value; } }
|
||||
public virtual Infoset Infoset { get; private set; }
|
||||
public virtual Infoset Infoset { get; protected set; }
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,6 @@ namespace Orchard.ContentManagement.Records {
|
||||
|
||||
[StringLengthMax]
|
||||
public virtual string Data { get { return Infoset.Data; } set { Infoset.Data = value; } }
|
||||
public virtual Infoset Infoset { get; private set; }
|
||||
public virtual Infoset Infoset { get; protected set; }
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,8 @@ namespace Orchard.Data.Conventions
|
||||
|
||||
public void Accept(IAcceptanceCriteria<IManyToOneInspector> criteria)
|
||||
{
|
||||
criteria.Expect(x => x.Property != null && x.Property.IsDefined(typeof(AggregateAttribute), false));
|
||||
// todo
|
||||
// criteria.Expect(x => x.Property != null && x.Property.IsDefined(typeof(AggregateAttribute), false));
|
||||
}
|
||||
|
||||
public void Apply(IOneToManyCollectionInstance instance)
|
||||
|
@ -1,11 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentNHibernate;
|
||||
using FluentNHibernate.Automapping;
|
||||
using FluentNHibernate.Automapping.Alterations;
|
||||
using FluentNHibernate.Cfg;
|
||||
using FluentNHibernate.Cfg.Db;
|
||||
using FluentNHibernate.Conventions.Helpers;
|
||||
using FluentNHibernate.Diagnostics;
|
||||
using NHibernate.Cfg;
|
||||
using Orchard.ContentManagement.Records;
|
||||
using Orchard.Data.Conventions;
|
||||
@ -48,6 +50,14 @@ namespace Orchard.Data.Providers {
|
||||
public TypeSource(IEnumerable<RecordBlueprint> recordDescriptors) { _recordDescriptors = recordDescriptors; }
|
||||
|
||||
public IEnumerable<Type> GetTypes() { return _recordDescriptors.Select(descriptor => descriptor.Type); }
|
||||
|
||||
public void LogSource(IDiagnosticLogger logger) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string GetIdentifier() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ using System.Data;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using FluentNHibernate.Cfg.Db;
|
||||
using NHibernate.Dialect;
|
||||
using NHibernate.Driver;
|
||||
using NHibernate.SqlTypes;
|
||||
|
||||
@ -29,7 +30,7 @@ namespace Orchard.Data.Providers {
|
||||
}
|
||||
|
||||
public override IPersistenceConfigurer GetPersistenceConfigurer(bool createDatabase) {
|
||||
var persistence = MsSqlCeConfiguration.Standard;
|
||||
var persistence = MsSqlCeConfiguration.MsSqlCe40;
|
||||
|
||||
if (createDatabase) {
|
||||
File.Delete(_fileName);
|
||||
@ -104,4 +105,45 @@ namespace Orchard.Data.Providers {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MsSqlCeConfiguration : PersistenceConfiguration<MsSqlCeConfiguration> {
|
||||
protected MsSqlCeConfiguration() {
|
||||
Driver<CustomSqlServerCeDriver>();
|
||||
}
|
||||
|
||||
public static MsSqlCeConfiguration MsSqlCe40 {
|
||||
get { return new MsSqlCeConfiguration().Dialect<CustomMsSqlCe40Dialect>(); }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Custom driver so that Text/NText fields are not truncated at 4000 characters
|
||||
/// </summary>
|
||||
public class CustomSqlServerCeDriver : SqlServerCeDriver {
|
||||
protected override void InitializeParameter(IDbDataParameter dbParam, string name, SqlType sqlType) {
|
||||
base.InitializeParameter(dbParam, name, sqlType);
|
||||
|
||||
PropertyInfo dbParamSqlDbTypeProperty = dbParam.GetType().GetProperty("SqlDbType");
|
||||
|
||||
if (sqlType.Length <= 4000) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (sqlType.DbType) {
|
||||
case DbType.String:
|
||||
dbParamSqlDbTypeProperty.SetValue(dbParam, SqlDbType.NText, null);
|
||||
break;
|
||||
case DbType.AnsiString:
|
||||
dbParamSqlDbTypeProperty.SetValue(dbParam, SqlDbType.Text, null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class CustomMsSqlCe40Dialect : MsSqlCe40Dialect {
|
||||
public override bool SupportsVariableLimit {
|
||||
get { return true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ using Orchard.Logging;
|
||||
using Orchard.Utility.Extensions;
|
||||
|
||||
namespace Orchard.Data {
|
||||
public class Repository<T> : IRepository<T> {
|
||||
public class Repository<T> : IRepository<T> where T : class {
|
||||
private readonly ISessionLocator _sessionLocator;
|
||||
|
||||
public Repository(ISessionLocator sessionLocator) {
|
||||
@ -27,7 +27,7 @@ namespace Orchard.Data {
|
||||
}
|
||||
|
||||
public virtual IQueryable<T> Table {
|
||||
get { return Session.Linq<T>(); }
|
||||
get { return Session.Query<T>(); }
|
||||
}
|
||||
|
||||
#region IRepository<T> Members
|
||||
@ -99,7 +99,7 @@ namespace Orchard.Data {
|
||||
public virtual void Update(T entity) {
|
||||
Logger.Debug("Update {0}", entity);
|
||||
Session.Evict(entity);
|
||||
Session.SaveOrUpdateCopy(entity);
|
||||
Session.Merge(entity);
|
||||
}
|
||||
|
||||
public virtual void Delete(T entity) {
|
||||
|
@ -66,22 +66,23 @@
|
||||
<Reference Include="Castle.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\Castle Windsor 2.0\bin\Castle.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Castle.DynamicProxy2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\Castle Windsor 2.0\bin\Castle.DynamicProxy2.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ClaySharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\claysharp\ClaySharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentNHibernate, Version=1.0.0.593, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<Reference Include="FluentNHibernate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\FluentNHibernate.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\..\lib\nhibernate\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections, Version=1.0.1.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\nhibernate\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@ -89,15 +90,9 @@
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NHibernate, Version=2.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<Reference Include="NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\fluentnhibernate\NHibernate.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate.Linq, Version=1.0.0.4000, Culture=neutral, PublicKeyToken=444cf6a87fdab271, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\linqnhibernate\NHibernate.Linq.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<HintPath>..\..\lib\nhibernate\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations">
|
||||
|
Loading…
Reference in New Issue
Block a user