{"id":934,"date":"2016-08-16T13:28:24","date_gmt":"2016-08-16T10:28:24","guid":{"rendered":"http:\/\/guvensahin.com\/?p=934"},"modified":"2020-07-05T15:11:48","modified_gmt":"2020-07-05T12:11:48","slug":"dynamics-ax-7-ile-x-plus-plus-a-gelen-yenilikler","status":"publish","type":"post","link":"https:\/\/guvensahin.com\/tr\/dynamics-ax-7-ile-x-plus-plus-a-gelen-yenilikler\/","title":{"rendered":"Dynamics AX 7 ile X++&#8217;a Gelen Yenilikler"},"content":{"rendered":"<p>Merhaba,<\/p>\n<p>Bu yaz\u0131da ax 7 ile birlikte x++&#8217;a gelmi\u015f yeniliklerden bahsece\u011fim. A\u015fa\u011f\u0131da bahsedece\u011fim \u00f6zellikler halihaz\u0131rda c# da bulunuyor. Kullan\u0131mlar\u0131 c# ile neredeyse birebir ayn\u0131. Buyrun ba\u015flayal\u0131m.<\/p>\n<h2>1. Inline variable deste\u011fi<\/h2>\n<p>Art\u0131k sadece ilgili method&#8217;un ba\u015f\u0131nda de\u011fil kod i\u00e7inde istedi\u011fimiz yerde de\u011fi\u015fken tan\u0131mlayabiliyoruz. Tan\u0131mlan\u0131lan de\u011fi\u015fken sadece, tan\u0131mland\u0131\u011f\u0131 scope boyunca kullan\u0131labiliyor. A\u015fa\u011f\u0131da for da kullan\u0131lan i de\u011fi\u015fkenini direkt ifadenin i\u00e7inde tan\u0131mlad\u0131m. Ax 7 den \u00f6nceki versiyonlarda bu kod hata vericektir.<\/p>\n<pre>  void MyMethod()\n  {\n    for (int i = 0; i &lt; 10; i++)\n    {\n      info(strfmt(\"i is %1\", i));\n    }\n  }\n<\/pre>\n<p>&nbsp;<\/p>\n<h2>2. Var keyword deste\u011fi<\/h2>\n<p>De\u011fi\u015fken tan\u0131mlarken tipini belirtmek zorunda de\u011filiz. var keyword&#8217;\u00fcn\u00fc kullanarak de\u011fi\u015fkenin initial value&#8217;su ne ise tipinin o olmas\u0131n\u0131 sa\u011flayabilirsiniz.<\/p>\n<pre>var var1 = \"Bu bir string ifadedir.\";\nvar var2 = 27; \/\/ integer\n<\/pre>\n<p>&nbsp;<\/p>\n<h2>3. Using deyimi<\/h2>\n<p>Using ifadesi i\u00e7indeki obje sadece using&#8217;in scope&#8217;u boyunca ge\u00e7erli. scope bitince obje(\u00f6rnekteki sr objesi) kill ediliyor. A\u015fa\u011f\u0131daki \u00f6rnekde hem using hemde inline variable declaration mevcut.<\/p>\n<pre>  static void AnotherMethod()\n  {\n    str textFromFile;\n\n    using (System.IO.StreamReader sr = new System.IO.StreamReader(\"c:\\\\test.txt\"))\n    {\n      textFromFile = sr.ReadToEnd();\n    }\n  }\n<\/pre>\n<p>&nbsp;<\/p>\n<h2>4. Finally blo\u011fu<\/h2>\n<p>Try\/catch ifadesine yeni eklenen bir keyword. kod catch&#8217;e d\u00fc\u015fs\u00fcn d\u00fc\u015fmesin mutlaka \u00e7al\u0131\u015f\u0131yor.<\/p>\n<pre>  try\n  {\n    \/\/ ...\n  }\n  catch\n  {\n    \/\/ ...\n  }\n  finally\n  {\n    \/\/ her durumda bu blok i\u00e7indeki kod \u00e7al\u0131\u015f\u0131r.\n    \/\/ dispose vb i\u015flemlerde kullan\u0131labilir.\n  }\n<\/pre>\n<p>&nbsp;<\/p>\n<h2>5. Consts deste\u011fi<\/h2>\n<p>AX 7 de macrolar halen duruyor ve kullan\u0131l\u0131yorlar. Fakat art\u0131k consts deste\u011fi geldi\u011fi i\u00e7in ms bunun kullan\u0131lmas\u0131n\u0131 \u00f6neriyor. macroya g\u00f6re faydalar\u0131 ise:<\/p>\n<ol>\n<li>VS IntelliSense taraf\u0131ndan tan\u0131n\u0131yorlar.<\/li>\n<li>Cross referenced destekleniyor. Development s\u0131ras\u0131nda bir constant&#8217;\u0131n nerelerde kullan\u0131ld\u0131\u011f\u0131n\u0131 bulabiliyorsunuz.<\/li>\n<li>consts scope bazl\u0131 \u00e7al\u0131\u015f\u0131yor.<\/li>\n<li>consts i\u00e7indeki de\u011feri debug s\u0131ras\u0131nda g\u00f6rebiliyorsunuz. macrolar\u0131 g\u00f6remiyorsunuz. (hatta bu sebeple ax da kodlar\u0131 korumak, enkripte etmek i\u00e7in macrolar\u0131 kullanan toollar mevcut)<\/li>\n<li>consts i\u00e7in access modifiers tan\u0131mlayabilirsiniz. private, protected, public.<\/li>\n<li>consts tan\u0131m\u0131nda \/\/\/ ile ba\u015flayan comment tan\u0131mlayabilirsiniz. intellisense de veya kod commentlerinden d\u00f6k\u00fcmantasyon olu\u015fturuldu\u011funda yazd\u0131\u011f\u0131n\u0131z a\u00e7\u0131klama g\u00f6z\u00fckecektir.<\/li>\n<\/ol>\n<pre>private const str MyContant = 'SomeValue';\n<\/pre>\n<p>kullan\u0131m\u0131:<\/p>\n<pre>str value = MyClass::MyContant;\n<\/pre>\n<p>&nbsp;<\/p>\n<h2>6. Class propertylerine access modifiers deste\u011fi<\/h2>\n<p>7 den \u00f6nceki ax versiyonlar\u0131nda class decleration da tan\u0131ml\u0131 de\u011fi\u015fkenler standart olarak protected geliyordu. Art\u0131k private, protected ve public kullanabilece\u011fiz.<\/p>\n<h2>7. Using y\u00f6nergesi ile referans \u00e7a\u011f\u0131rma<\/h2>\n<p>\u00d6zellikle .NET s\u0131n\u0131flar\u0131 ile \u00e7al\u0131\u015f\u0131rken b\u00fcy\u00fck kolayl\u0131k sa\u011flayacak bir ba\u015fka \u00f6zellik. kullan\u0131m\u0131 c# ile ayn\u0131.<\/p>\n<pre>using System;\nusing IONS=System.IO; \/\/ Namespace alias\nusing Alist=System.Collections.ArrayList; \/\/ Class alias\n\npublic class MyClass2\n{\n  public static void Main(Args a)\n  {\n    Int32 I; \/\/ Alternative to System.Int32\n    Alist al; \/\/ Using a class alias\n\n    al = new Alist();\n    str s;\n\n    al.Add(1);\n\n    s = IONS.Path::ChangeExtension(@\"c:\\tmp\\test.xml\", \".txt\");\n  }\n}\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u015euan i\u00e7in en \u00e7ok g\u00f6z\u00fcme \u00e7arpan de\u011fi\u015fikliklerden bahsettim. Ba\u015fka de\u011fi\u015fikliklerde mevcut. Bir sonraki yaz\u0131mda da onlara de\u011finece\u011fim.<\/p>\n<p>Ho\u015f\u00e7akal\u0131n.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Merhaba, Bu yaz\u0131da ax 7 ile birlikte x++&#8217;a gelmi\u015f yeniliklerden bahsece\u011fim. A\u015fa\u011f\u0131da bahsedece\u011fim \u00f6zellikler halihaz\u0131rda c# da bulunuyor. Kullan\u0131mlar\u0131 c# ile neredeyse birebir ayn\u0131. Buyrun ba\u015flayal\u0131m. 1. Inline variable deste\u011fi Art\u0131k sadece ilgili method&#8217;un ba\u015f\u0131nda de\u011fil kod i\u00e7inde istedi\u011fimiz yerde de\u011fi\u015fken tan\u0131mlayabiliyoruz. Tan\u0131mlan\u0131lan de\u011fi\u015fken sadece, tan\u0131mland\u0131\u011f\u0131 scope boyunca kullan\u0131labiliyor. A\u015fa\u011f\u0131da for da kullan\u0131lan i de\u011fi\u015fkenini&hellip;&nbsp;<a href=\"https:\/\/guvensahin.com\/tr\/dynamics-ax-7-ile-x-plus-plus-a-gelen-yenilikler\/\" rel=\"bookmark\">Daha fazlas\u0131n\u0131 oku &raquo;<span class=\"screen-reader-text\">Dynamics AX 7 ile X++&#8217;a Gelen Yenilikler<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":915,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[405],"tags":[193,394,438,198,285],"class_list":["post-934","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-365-fo","tag-axapta","tag-dynamics-365","tag-dynamics-365-finance-and-operations","tag-dynamics-ax-2","tag-x"],"_links":{"self":[{"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/posts\/934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/comments?post=934"}],"version-history":[{"count":13,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/posts\/934\/revisions"}],"predecessor-version":[{"id":985,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/posts\/934\/revisions\/985"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/media\/915"}],"wp:attachment":[{"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/media?parent=934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/categories?post=934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guvensahin.com\/tr\/wp-json\/wp\/v2\/tags?post=934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}