Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OKB/HeuristicLab.Clients.OKB-3.3/ServiceClients/TweakServiceClients.ps1 @ 4433

Last change on this file since 4433 was 4433, checked in by swagner, 14 years ago

Worked on OKB data model and services (#1174)

File size: 716 bytes
Line 
1$path = $args[0]
2$code = Get-Content -Path $path
3
4Clear-Content $path
5
6for ($i = 0; $code[$i] -ne $NULL; $i++) {
7  $str = $code[$i]
8  $ignore = $FALSE
9
10  # change base class of data contracts from "object" to "OKBItem"
11  $str = $str.Replace("object, ", "OKBItem, ")
12
13  # remove public event "PropertyChanged"
14  if ($str.Contains("public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;")) {
15    $ignore = $TRUE
16  }
17
18  # remove protected method "RaisePropertyChanged(string propertyName)"
19  if ($str.Contains("protected void RaisePropertyChanged(string propertyName)")) {
20    $ignore = $TRUE
21    $i = $i + 7
22  }
23
24  if (-not $ignore) {
25    Add-Content $path $str
26  }
27}
Note: See TracBrowser for help on using the repository browser.