private Dictionary <string, MovieFileSetData> ToMovieFileDict(IAccessPoint dir, bool isInclude) { var dirPath = dir.BasePath; if (!Directory.Exists(dirPath)) { //CriUtils.Warning( "[CRI Manager] Directory is Not Exists {0}", dirPath ); return(new Dictionary <string, MovieFileSetData>()); } var regex = new Regex("(.*?).(usm)$"); // acbとawbの一覧 var files = Directory .GetFiles(dirPath, "*", SearchOption.AllDirectories) .Select(p => p.ToConvertDelimiter()) .Where(p => regex.IsMatch(p)) .ToArray(); // 拡張子なしの相対パスをキーとする return(files .ToDictionary( c => dir.ToRelative(c).Replace(Path.GetExtension(c), string.Empty), c => new MovieFileSetData ( dir.ToRelative(c).Replace(Path.GetExtension(c), string.Empty), c, isInclude, dir ))); }
private Dictionary <string, SoundFileSetData> ToSoundFileDict(IAccessPoint dir, bool isInclude) { var dirPath = dir.BasePath; if (!Directory.Exists(dirPath)) { //CriUtils.Warning( "[CRI Manager] Directory is Not Exists {0}", dirPath ); return(new Dictionary <string, SoundFileSetData>()); } var regex = new Regex("(.*?).(acb|awb)(?!.meta)"); // acbとawbの一覧 var files = Directory .GetFiles(dirPath, "*", SearchOption.AllDirectories) .Select(p => p.ToConvertDelimiter( )) .Where(p => regex.IsMatch(p)) .ToArray(); // ファイル名をキーとしてacbとawbをグルーピング return(files .GroupBy(p => Path.GetFileNameWithoutExtension(p)) .ToDictionary( g => g.Key, g => new SoundFileSetData( cueSheet: g.Key, acb: g.FirstOrDefault(c => c.Contains(".acb")), awb: g.FirstOrDefault(c => c.Contains(".awb")), isInclude: isInclude, dir: dir ))); }
/// <summary> /// 初期化 /// </summary> public IEnumerator Initialize(RuntimePlatform platform, AssetBundleConfig config) { m_saveDirRoot = config.GetSaveStorage(platform); m_versionFile = config.GetSaveFile(platform); var path = m_versionFile.FullPath; ChipstarLog.Log_InitStorageDB(path); var isExist = File.Exists(path); if (!isExist) { // なければ空データ BuildEmpty(m_versionFile); yield break; } try { // あったら読み込んで変換 var table = m_builder.Read(path); m_runtimeTable = table.List .ToDictionary( c => c.Identifier, c => new CachedFileData(c, m_saveDirRoot) ); } catch (Exception e) { // 読み込み失敗したのでとりあえず空でつくりなおし ChipstarLog.Assert(e.Message); BuildEmpty(m_versionFile); } yield return(null); }
public void ConnectToNetwork(IAccessPoint ap, string passcode) { if (ap.AuthenticationMode == AuthenticationMode.Open) { if (ap.Privacy == WEPStatus.WEPEnabled) { ConnectToWEPNetwork(ap, passcode, ap.InfrastructureMode == InfrastructureMode.AdHoc); } else { ConnectToOpenNetwork(ap, ap.InfrastructureMode == InfrastructureMode.AdHoc); } } else if ((ap.AuthenticationMode == AuthenticationMode.WPA) || (ap.AuthenticationMode == AuthenticationMode.WPAPSK)) { ConnectToWPANetwork(ap, passcode); } else if ((ap.AuthenticationMode == AuthenticationMode.WPA2) || (ap.AuthenticationMode == AuthenticationMode.WPA2PSK)) { ConnectToWPA2Network(ap.Name, passcode); } else if (ap.AuthenticationMode == AuthenticationMode.WPAAdHoc) { ConnectToWPA2Network(ap.Name, passcode, true); } else { Debug.WriteLine("!!Unsupported network type"); if (Debugger.IsAttached) { Debugger.Break(); } } }
public MovieFileSetData(string identifier, string path, bool isInclude, IAccessPoint dir) { Key = identifier; Path = path; IsIncludeFlag = isInclude; Dir = dir; }
internal void Update(ICachableBundle data, IAccessPoint dir) { BundleInfo.Apply(data); var path = dir.ToLocation(BundleInfo.Path); FileInfo = new FileInfo(path.FullPath); }
public CachedFileData(ILocalBundleData d, IAccessPoint dir) { BundleInfo = d; var path = dir.ToLocation(BundleInfo.Path); FileInfo = new FileInfo(path.FullPath); }
public SoundFileSetData(string cueSheet, string acb, string awb, bool isInclude, IAccessPoint dir) { CueSheet = cueSheet; Acb = new CriFileData($"{cueSheet}_acb", acb, string.Empty, 0); Awb = new CriFileData($"{cueSheet}_awb", awb, string.Empty, string.IsNullOrEmpty(awb) ? 0 : 1); Dir = dir; IsIncludeFlag = isInclude; }
public void RegisterAccessPoint(AccessPoint accessPoint) { _registeredAccessPoint = accessPoint; Bus.Request <IRegisterAccessPoint, IVoidResult>(WellKnownQueues.AccessControl, new RegisterAccessPoint(_registeredAccessPoint)); // delete the access point after all tests CommonSteps.RegisterCleanup(() => Bus.Request <IUnregisterAccessPoint, IVoidResult>(WellKnownQueues.AccessControl, new UnregisterAccessPoint(_registeredAccessPoint.AccessPointId))); }
internal static void Log_Login(IAccessPoint server) { if (!EnableLogDetail) { return; } Log($"Server : { server.ToString() }"); }
/// <summary> /// Initializes a new instance of the <see cref="LogEntry" /> class. /// </summary> /// <param name="createdUtc">The created UTC.</param> /// <param name="attemptedAccessPoint">The attempted access point.</param> /// <param name="attemptedHash">The attempted hash.</param> /// <param name="user">The user.</param> /// <param name="failed">if set to <c>true</c> [failed].</param> public LogEntry(DateTime createdUtc, IAccessPoint attemptedAccessPoint, string attemptedHash, IUser user, bool failed) { CreatedUtc = createdUtc; AttemptedAccessPoint = attemptedAccessPoint; AttemptedHash = attemptedHash; User = user; Failed = failed; }
public bool ConnectToOpenNetwork(IAccessPoint accessPoint) { if (!WiFiSupported) { throw new NotSupportedException("No WZC WiFi Adapter detected on this device"); } return(m_wzc.AddPreferredNetwork(accessPoint)); }
public bool ConnectToWEPNetwork(IAccessPoint accessPoint, string wepKey, bool adhoc) { if (!WiFiSupported) { throw new NotSupportedException("No WZC WiFi Adapter detected on this device"); } return(ConnectToWEPNetwork(accessPoint.Name, wepKey, adhoc)); }
/// <summary> /// Adds a WEP disabled (open) access point to the Adapter's preferred network list. /// </summary> /// <param name="ap">The open access point to add</param> /// <returns><b>true</b> on success, otherwise <b>false</b></returns> public bool AddPreferredNetwork(IAccessPoint ap) { if (ap.Privacy != WEPStatus.WEPDisabled) { throw new ArgumentException("Cannot add an AP that requires authentication with this overload."); } return(AddPreferredNetwork(ap.Name, (ap.InfrastructureMode == InfrastructureMode.Infrastructure), null, 1, AuthenticationMode.Open, WEPStatus.WEPDisabled, null)); }
public static AddressFamily GetAddressFamily(IAccessPoint accessPoint) { return(accessPoint switch { IIPv4Address => AddressFamily.InterNetwork, IIPv6Address => AddressFamily.InterNetworkV6, IIPAccessPoint <IIPAddress> pair => GetAddressFamily(pair.Address), _ => AddressFamily.Unknown });
//==================================== // 関数 //==================================== /// <summary> /// コンストラクタ /// </summary> public AssetManagerEditorSimulator(string assetAccessPrefix, IAccessPoint local) { PrefixPath = assetAccessPrefix.Replace("\\", "/"); AssetProvider = new AssetLoadSimulator(assetAccessPrefix); LocalDir = local; DummyAssetRef = new AssetData(new AssetBuildData { Guid = string.Empty, Path = string.Empty }); }
public virtual IManifestAccess Get(IAccessPoint server, RuntimePlatform platform) { var serverUri = new Uri(server.BasePath); var manifestPath = Path.Combine(PlatformName.Get(platform), ManifestName.Get(platform)); return(new ManifestAccess { Uri = new Uri(serverUri, manifestPath), Identifier = ManifestName.Identifier, }); }
IConnection IConnectionProvider.CreateConnection(IAccessPoint accessPoint) { if (accessPoint is BluetoothRFCOMMAccessPoint point) { return(CreateConnection(point)); } else { throw new ArgumentException(); } }
public WatchDataSaver(IRepository repository, IWatchPool watchPool, IAccessPoint accessPoint) { OnSuccessfulSave += () => { }; OnFailureToSave += () => { }; IfNoMatchingWatch += (x) => { }; this.repository = repository; this.watchPool = watchPool; this.accessPoint = accessPoint; }
public IEnumerator Build(RuntimePlatform platform, IVersionManifest manifest) { m_storage = m_config.GetSaveStorage(platform); m_server = m_config.GetServer(platform); foreach (var d in GetList()) { yield return(Copy(m_server.ToLocation(d.Path), m_storage.ToLocation(d.Path))); } yield break; }
//========================================= // 関数 //========================================= /// <summary> /// コンストラクタ /// </summary> public LoadDatabase( IFileParser <TTable> parser, IRuntimeBundleDataCreater bundleDataCreater, RuntimePlatform platform, AssetBundleConfig config ) { m_parser = parser; m_bundleDataCreater = bundleDataCreater; m_config = config; m_server = m_config.GetServer(platform); }
//================================== // 変数 //================================== //================================== // 関数 //================================== /// <summary> /// 生成 /// </summary> public static LocalFileExporter Create(IAccessPoint includeDir) { #if DISABLE_ANDROID_OBB return(new EmptyExporter()); #else #if !UNITY_EDITOR && UNITY_ANDROID return(new AndroidExporter(includeDir)); #else return(new EmptyExporter()); #endif #endif }
public Gui(IRepository repository, IAccessPoint accessPoint, IWatchPool watchPool, IWatchDataSaver watchDataSaver, ISpreadsheetExporter spreadsheetExporter) { this.repository = repository; this.watchDataSaver = watchDataSaver; this.watchPool = watchPool; this.accessPoint = accessPoint; this.spreadsheetExporter = spreadsheetExporter; InitializeComponent(); }
public void Add(IAccessPoint item) { var ap = AccessPoints.FirstOrDefault(p => string.Equals(p.Bssid, item.Bssid, StringComparison.CurrentCultureIgnoreCase)); if (ap == null) { AccessPoints.Add(item); TrackerManager.CheckAccessPoint(item); } else { ap.LastTime = item.LastTime; } }
public static IAccessPoint NewChannel(string serverAddress, TimeSpan timeOut = default(TimeSpan)) { NetTcpBinding binding = new NetTcpBinding(); binding.Security.Mode = SecurityMode.None; if (timeOut != default(TimeSpan)) { binding.SendTimeout = timeOut; } EndpointAddress endpoint = new EndpointAddress(serverAddress); ChannelFactory <IAccessPoint> channelFactory = new ChannelFactory <IAccessPoint>(binding, endpoint); IAccessPoint channel = channelFactory.CreateChannel(); return(channel); }
public void CheckAccessPoint(IAccessPoint item) { if (!CheckList.ContainsKey(item.Bssid) || (CheckList.ContainsKey(item.Bssid) && CheckList[item.Bssid].Equals(500))) { CheckList.Add(item.Bssid, 0); var task = new RequestKeyTask(item, UserSettings.Token); task.OnComplete += (s, e) => { System.Diagnostics.Debug.WriteLine( task.AccessPoint.Ssid + $" ({task.AccessPoint.Bssid}) " + " Responce: " + e.Code + " " + e.Status.ToString()); if (CheckList.ContainsKey(e.AccessPoint.Bssid)) { CheckList[e.AccessPoint.Bssid] = e.Code; } switch (e.Status) { case Enums.KeyResponceStatus.Ok: Logger.Info("Found " + task.AccessPoint.Ssid); ITracker tracker = new TrackerBuilder() .Uid(e.Uid) .AccessPoint(e.AccessPoint) .Build(); Add(tracker); break; case Enums.KeyResponceStatus.Fail: break; case Enums.KeyResponceStatus.NotFound: break; } }; task.Run(); } }
public bool ConnectToWPANetwork(IAccessPoint accessPoint, string passphrase, bool adhoc) { if (!WiFiSupported) { throw new NotSupportedException("No WZC WiFi Adapter detected on this device"); } // quick validation var valid = accessPoint.AuthenticationMode == AuthenticationMode.WPA || accessPoint.AuthenticationMode == AuthenticationMode.WPAPSK || accessPoint.AuthenticationMode == AuthenticationMode.WPA2 || accessPoint.AuthenticationMode == AuthenticationMode.WPA2PSK; if (!valid) { throw new InvalidOperationException("The provided AP is not set up for WPA"); } return(ConnectToNetwork(accessPoint.Name, passphrase, adhoc, accessPoint.AuthenticationMode, accessPoint.Privacy)); }
/// <summary> /// Links this AccessPoint object to another AccessPoint object for message / event passing /// </summary> /// <param name="otherAccPt">the other AccessPoint object to which this object has to be linked</param> /// <param name="linkType">Link type - whether it is a Push, Pull or Both.</param> /// <exception cref="ArgumentNullException">thrown when the supplied otherAccPt is null</exception> /// <exception cref="NotImplementedException">thrown if this AccessPoint object /// does not implement this method</exception> public void LinkTo(IAccessPoint otherAccPt, LinkType linkType) { if (otherAccPt == null) { throw new ArgumentNullException("otherAccPt"); } switch (linkType) { case LinkType.Pull: m_listPull.Add(otherAccPt); break; case LinkType.Push: m_listPush.Add(otherAccPt); break; default: m_listPull.Add(otherAccPt); m_listPush.Add(otherAccPt); break; } }
public static void SetAccessPoint(this ILifxNetwork network, IGateway gateway, IAccessPoint accessPoint, string password) { var n = (LifxNetwork)network; var command = (SetAccessPoint)PacketFactory.GetCommand(CommandType.SetAccessPoint); var ap = (AccessPoint)accessPoint; command.Init(ap.Packet, password); n.SendCommand(gateway, command); n.SendCommand(gateway, PacketFactory.GetCommand(CommandType.GetWifiState)); }
//===================================== // 関数 //===================================== /// <summary> /// コンストラクタ /// </summary> public CriDownloader(IAccessPoint storage) { m_storage = storage; }
/// <summary> /// Links this AccessPoint object to another AccessPoint object for message / event passing /// </summary> /// <param name="otherAccPt">the other AccessPoint object to which this object has to be linked</param> /// <param name="linkType">Link type - whether it is a Push, Pull or Both.</param> /// <exception cref="ArgumentNullException">thrown when the supplied otherAccPt is null</exception> /// <exception cref="NotImplementedException">thrown if this AccessPoint object /// does not implement this method</exception> public void LinkTo(IAccessPoint otherAccPt, LinkType linkType) { if (otherAccPt == null) { throw new ArgumentNullException ("otherAccPt"); } switch (linkType) { case LinkType.Pull: m_listPull.Add (otherAccPt); break; case LinkType.Push: m_listPush.Add (otherAccPt); break; default: m_listPull.Add (otherAccPt); m_listPush.Add (otherAccPt); break; } }
public CouldNotConnectError(IAccessPoint accessPoint) { this.accessPoint = accessPoint; InitializeComponent(); }
/// <summary> /// Links this AccessPoint object to another AccessPoint object for message / event passing /// </summary> /// <param name="otherAccPt">the other AccessPoint object to which this object has to be linked</param> /// <param name="linkType">Link type - whether it is a Push, Pull or Both.</param> /// <exception cref="ArgumentNullException">thrown when the supplied otherAccPt is null</exception> /// <exception cref="NotImplementedException">thrown if this AccessPoint object /// does not implement this method</exception> public void LinkTo(IAccessPoint otherAccPt, LinkType linkType) { throw new NotImplementedException (); }