<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.dotnetzone.gr:443/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>.NET Framework</title><link>https://www.dotnetzone.gr:443/cs/forums/14/ShowForum.aspx</link><description>Θέματα για threading, remoting, reflection, exception handling, security, regex κλπ.</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: Reflection από dll σε dll</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/13259.aspx</link><pubDate>Wed, 24 May 2006 22:58:30 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:13259</guid><dc:creator>pontifikas</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/13259.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=13259</wfw:commentRss><description>Χμμ...Την βρήκα την λύση. Δεν έκανα load τα assemblies&lt;img src="/cs/emoticons/emotion-10.gif" alt="Embarrassed [:$]" /&gt;&lt;img src="/cs/emoticons/emotion-10.gif" alt="Embarrassed [:$]" /&gt;&lt;br&gt;&lt;span style="color: Black;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;            &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;string&lt;/span&gt;[] libraries &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;new&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;string&lt;/span&gt;[2] { &lt;span style="color: #666666;background-color: #e4e4e4;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;"Assembly1"&lt;/span&gt;, &lt;span style="color: #666666;background-color: #e4e4e4;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;"Assembly2"&lt;/span&gt; };&lt;br /&gt;            &lt;br /&gt;            Type myType &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;null&lt;/span&gt;;&lt;br /&gt;            System.Reflection.MemberInfo myMember &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;null&lt;/span&gt;;&lt;br /&gt;            System.Reflection.MemberInfo[] myMembers &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;null&lt;/span&gt;;&lt;br /&gt;            Type[] _types &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;null&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;foreach&lt;/span&gt; (&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;string&lt;/span&gt; source &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;in&lt;/span&gt; libraries)&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;try&lt;/span&gt;&lt;br /&gt;                {&lt;br /&gt;                    &lt;span style="color: Green;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;//Φόρτωσε το dll(ή exe) με το όνομα από το Libraries&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: Green;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;//Εαν δεν υπάρχει θα φάμε exception στην μούρη.&lt;/span&gt;&lt;br /&gt;                    Assembly myassemply &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; Assembly.Load(source);&lt;br /&gt;                    &lt;span style="color: Green;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;//Πάρε τα modules του assembly.&lt;/span&gt;&lt;br /&gt;                    Module[] modules &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; myassemply.GetLoadedModules();&lt;br /&gt;                    &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;foreach&lt;/span&gt; (Module mod &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;in&lt;/span&gt; modules)&lt;br /&gt;                    {&lt;br /&gt;                        &lt;span style="color: Green;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;//Μάζεψε όλες τις δομές από κάθε module&lt;/span&gt;&lt;br /&gt;                        _types &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; mod.GetTypes();&lt;br /&gt;                        &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;foreach&lt;/span&gt; (Type t &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;in&lt;/span&gt; _types)&lt;br /&gt;                        {&lt;br /&gt;                            &lt;span style="color: Green;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;//Για κάθε δομή&lt;/span&gt;&lt;br /&gt;                            myType &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; t;&lt;br /&gt;                            &lt;span style="color: Green;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;//Ψάξε το ζητούμενο.&lt;/span&gt;&lt;br /&gt;                            myMembers &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; t.GetMember(vArg);&lt;br /&gt;                            &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;if&lt;/span&gt; (myMembers.Length !&lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; 0)&lt;br /&gt;                            {&lt;br /&gt;                                found &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;true&lt;/span&gt;;&lt;br /&gt;                                &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;break&lt;/span&gt;;&lt;br /&gt;                            }&lt;br /&gt;                            &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;if&lt;/span&gt; (found) &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;break&lt;/span&gt;;&lt;br /&gt;                        }&lt;br /&gt;                        &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;if&lt;/span&gt; (found) &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;break&lt;/span&gt;;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;                &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;catch&lt;/span&gt;&lt;br /&gt;                {&lt;br /&gt;                }&lt;br /&gt;                &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;if&lt;/span&gt; (found) &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;break&lt;/span&gt;;&lt;br /&gt;            }&lt;/span&gt;&lt;br&gt;&lt;br&gt;Ευχαριστώ για τις απαντήσεις.&lt;br&gt;</description></item><item><title>Απ: Reflection από dll σε dll</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/13155.aspx</link><pubDate>Tue, 23 May 2006 17:58:27 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:13155</guid><dc:creator>pontifikas</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/13155.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=13155</wfw:commentRss><description>Με τον 2ο τρόπο.&lt;br /&gt;
&lt;br /&gt;
Μόλις παίξω λίγο ακόμα θα κάνω και post λίγο κώδικα</description></item><item><title>Απ: Reflection από dll σε dll</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/13150.aspx</link><pubDate>Tue, 23 May 2006 17:29:56 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:13150</guid><dc:creator>anjelinio</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/13150.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=13150</wfw:commentRss><description>Πως αλλάζεις τις τιμές στην εφαρμογή σου; Εννοώ ... &lt;br /&gt;
&lt;br /&gt;
string myVar = MyDll1Class.Var1;&lt;br /&gt;
&lt;br /&gt;
myVar += "kati prosthesa";&lt;br /&gt;
&lt;br /&gt;
ή &lt;br /&gt;
&lt;br /&gt;
MyDll1Class.Var1 += "kati prosthesa";&lt;br /&gt;
&lt;br /&gt;
Θεωρητικά μιλώντας πάντα, ο πρώτος τρόπος δε θα αλλάξει την τιμή του property.&lt;br /&gt;
&lt;br /&gt;</description></item><item><title>Απ: Reflection από dll σε dll</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/13148.aspx</link><pubDate>Tue, 23 May 2006 17:00:22 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:13148</guid><dc:creator>Παναγιώτης Καναβός</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/13148.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=13148</wfw:commentRss><description>Αυτό είναι property. Όταν ζητάς την τιμή ενός property, στην ουσία εκτελείς το get function. Για να σου επιστρέφει τις ίδιες τιμές με τις αρχικές, σημαίνει είτε ότι δεν έχει αλλάξει η τιμή του property είτε ότι δεν εκτελέστηκε το get, με άλλα λόγια, ότι δεν ζήτησες την τιμή του property. Ίσως έτσι όπως έχεις γράψει τον κώδικα, να κρατάει την αρχική τιμή αντί να καλεί ξανά το property. Μήπως μπορείς να γράψεις τον κώδικα που χρησιμοποιείς?&lt;br /&gt;
&lt;br /&gt;
Επίσης, σκέψου μήπως μια πιο απλή λύση κάνει τη δουλειά που θέλεις. Static properties, reflection κλπ μπερδεύουν πολύ την εφαρμογή. Μήπως θα μπορούσες να κάνεις την ίδια δουλειά ορίζοντας ένα interface και κάνοντας το implement σε διάφορες κλάσεις μέσα στα dll σου?</description></item><item><title>Απ: Reflection από dll σε dll</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/13134.aspx</link><pubDate>Tue, 23 May 2006 16:17:30 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:13134</guid><dc:creator>pontifikas</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/13134.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=13134</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;table width="85%"&gt;&lt;tr&gt;&lt;td class="txt4"&gt;&lt;img src="/cs/Themes/default/images/icon-quote.gif"&gt;&amp;nbsp;&lt;strong&gt;pkanavos wrote:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="quoteTable"&gt;&lt;table width="100%"&gt;&lt;tr&gt;&lt;td valign="top" class="txt4"&gt;Να υποθέσω ότι όταν λες μεταβλητές εννοείς πεδία?&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/BLOCKQUOTE&gt;&lt;br&gt;Νομίζω (C oriented here &lt;img src="/cs/emoticons/emotion-10.gif" alt="Embarrassed [:$]" /&gt;)&lt;br&gt;πχ &lt;br&gt;&lt;span style="color: Black;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;static&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;string&lt;/span&gt;[,] IF &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;new&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;string&lt;/span&gt;[3, 100];&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;public&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;static&lt;/span&gt; &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;string&lt;/span&gt; Var01&lt;br /&gt;        {&lt;br /&gt;            get { &lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;return&lt;/span&gt; IF[1, 11]; }&lt;br /&gt;            set { IF[1, 11] &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;=&lt;/span&gt; value; }&lt;br /&gt;        }&lt;/span&gt;&lt;br&gt;&lt;br&gt;Εγώ ζητάω την Var01. Αλλά μπορεί και να ζητήσω την IF(κάποιά άλλη στιγμή).&lt;br&gt;</description></item><item><title>Απ: Reflection από dll σε dll</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/13132.aspx</link><pubDate>Tue, 23 May 2006 15:58:33 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:13132</guid><dc:creator>Παναγιώτης Καναβός</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/13132.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=13132</wfw:commentRss><description>Να υποθέσω ότι όταν λες μεταβλητές εννοείς πεδία?</description></item><item><title>Reflection από dll σε dll</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/13131.aspx</link><pubDate>Tue, 23 May 2006 15:52:14 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:13131</guid><dc:creator>pontifikas</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/13131.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=13131</wfw:commentRss><description>Μου παρουσιάστηκε το έξης πρόβλημα:&lt;br&gt;&lt;br&gt;&lt;br&gt;Έχω μια εφαρμογή που χρησιμοποιεί 2 dlls. Το ένα από αυτά έχει πολλές static μεταβλητές που χρησιμοποιεί το πρόγραμμα.&lt;br&gt;και 2ο Dll.&lt;br&gt;&lt;br&gt;Tώρα.Μια συνάρτηση του 2ου dll, μέσω reflection, προσπαθεί να καλέσει την τιμή μιας μεταβλητής από το 1ο οι οποία έχει αλλαχθεί από την εφαρμογή.&lt;br&gt;&lt;br&gt;Το πρόβλημά μου είναι ότι με αυτόν τον τρόπο στην συνάρτηση δεν επιστρέφεται η τιμή που αυτή την στιγμή έχει η μεταβλητή, αλλά αυτήν με την οποία αρχικοποιείται στο dll.&lt;br&gt;&lt;br&gt;Πώς μπορώ να πετύχω τέτοια συνέπεια ώστε αν αλλάζω μια μεταβλητή από την εφαρμογή να μπορεί να την βλέπει το 2ο dll, και αν την αλλάζει το 2o dll, η αλλαγή αυτή να απεικονίζεται και στην εφαρμογή?&lt;br&gt;</description></item></channel></rss>